- Session:
. Fixed bug #74892 (Url Rewriting (trans_sid) not working on urls that start
with "#"). (Andrew Nester)
+ . Fixed bug #74936 (session_cache_expire/cache_limiter/save_path() trigger a
+ warning in read mode). (morozov)
+
+- SPL:
+ . Fixed bug #74669 (Unserialize ArrayIterator broken). (Andrew Nester)
20 Jul 2017, PHP 7.2.0beta1
return;
}
- if (PS(session_status) == php_session_active) {
+ if (name && PS(session_status) == php_session_active) {
php_error_docref(NULL, E_WARNING, "Cannot change save path when session is active");
RETURN_FALSE;
}
return;
}
- if (PS(session_status) == php_session_active) {
+ if (limiter && PS(session_status) == php_session_active) {
php_error_docref(NULL, E_WARNING, "Cannot change cache limiter when session is active");
RETURN_FALSE;
}
return;
}
- if (PS(session_status) == php_session_active) {
+ if (expires && PS(session_status) == php_session_active) {
php_error_docref(NULL, E_WARNING, "Cannot change cache expire when session is active");
RETURN_LONG(PS(cache_expire));
}
--- /dev/null
+--TEST--
+Bug #74936 session_cache_expire() triggers a warning in read mode.
+--SKIPIF--
+<?php
+include('skipif.inc');
+?>
+--FILE--
+<?php
+
+session_start();
+var_dump(session_cache_expire());
+var_dump(session_cache_limiter());
+var_dump(session_save_path());
+?>
+===DONE===
+--EXPECT--
+int(180)
+string(7) "nocache"
+string(0) ""
+===DONE===
int(180)
int(1234567890)
bool(true)
-
-Warning: session_cache_expire(): Cannot change cache expire when session is active in %s on line 17
int(180)
bool(true)
int(180)
int(360)
int(1234567890)
bool(true)
-
-Warning: session_cache_expire(): Cannot change cache expire when session is active in %s on line 17
int(180)
bool(true)
int(180)
int(360)
int(1234567890)
bool(true)
-
-Warning: session_cache_expire(): Cannot change cache expire when session is active in %s on line 18
int(180)
bool(true)
int(180)
int(180)
string(10) "1234567890"
bool(true)
-
-Warning: session_cache_expire(): Cannot change cache expire when session is active in %s on line 19
int(1234567890)
string(10) "1234567890"
bool(true)
*** Testing session_cache_limiter() : variation ***
string(7) "nocache"
bool(true)
-
-Warning: session_cache_limiter(): Cannot change cache limiter when session is active in %s on line 15
-bool(false)
+string(7) "nocache"
Warning: session_cache_limiter(): Cannot change cache limiter when session is active in %s on line 16
bool(false)
-
-Warning: session_cache_limiter(): Cannot change cache limiter when session is active in %s on line 17
-bool(false)
+string(7) "nocache"
bool(true)
string(7) "nocache"
Done
*** Testing session_cache_limiter() : variation ***
string(7) "nocache"
bool(true)
-
-Warning: session_cache_limiter(): Cannot change cache limiter when session is active in %s on line 16
-bool(false)
+string(7) "nocache"
Warning: session_cache_limiter(): Cannot change cache limiter when session is active in %s on line 17
bool(false)
-
-Warning: session_cache_limiter(): Cannot change cache limiter when session is active in %s on line 18
-bool(false)
+string(7) "nocache"
bool(true)
string(7) "nocache"
Done
string(0) ""
string(%d) "%stests"
bool(true)
-
-Warning: session_save_path(): Cannot change save path when session is active in %s on line 19
-bool(false)
+string(%d) "%stests"
Warning: session_save_path(): Cannot change save path when session is active in %s on line 20
bool(false)
-
-Warning: session_save_path(): Cannot change save path when session is active in %s on line 21
-bool(false)
+string(%d) "%stests"
bool(true)
string(%d) "%stests"
Done