PluginProbe
VikBooking Hotel Booking Engine & PMS / 1.8.16
VikBooking Hotel Booking Engine & PMS v1.8.16
1.8.16 1.8.15 1.8.14 1.8.13 1.8.12 1.8.11 1.8.10 1.8.9 1.8.6 1.8.7 1.8.8 trunk 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 All 37 releases
← All changes | libraries/adapter/session/handler.php +21 -2 1.8.6 → 1.8.16 View file →
@@ -36,12 +36,31 @@
36 36 {
37 37 return;
38 38 }
39 39
40 - if (!self::isStarted())
40 + /**
41 + * Do not go ahead in case the session has been already started, otherwise duplicate
42 + * calls to this method risks to register the same hook more than once.
43 + *
44 + * @since 10.1.70
45 + */
46 + if (self::isStarted())
41 47 {
42 - session_start();
48 + return;
43 49 }
50 +
51 + /**
52 + * In case the headers have been already sent, trigger warning and abort.
53 + *
54 + * @since 10.1.70
55 + */
56 + if (headers_sent())
57 + {
58 + trigger_error('Session cannot be started after headers have already been sent', E_USER_WARNING);
59 + return;
60 + }
61 +
62 + session_start();
44 63
45 64 /**
46 65 * Filters whether to preempt an HTTP request's return value.
47 66 * It is needed to support concurrent cURL requests (see Site Health).