File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -451,7 +451,7 @@ PS_CLOSE_FUNC(files)
451451
452452 zend_string_release_ex (data -> basedir , /* persistent */ false);
453453 efree (data );
454- PS_SET_MOD_DATA (NULL );
454+ PS_SET_MOD_DATA (data );
455455
456456 return SUCCESS ;
457457}
Original file line number Diff line number Diff line change 1+ --TEST--
2+ SessionHandler::validateId must return bool
3+ --INI--
4+ session.use_strict_mode=1
5+ --EXTENSIONS--
6+ session
7+ --SKIPIF--
8+ <?php include ('skipif.inc ' ); ?>
9+ --FILE--
10+ <?php
11+ class MySession extends SessionHandler {
12+ public function validateId ($ key ) {
13+ return null ;
14+ }
15+ }
16+
17+ $ handler = new MySession ();
18+
19+ try {
20+ session_set_save_handler ($ handler );
21+ session_start ();
22+ } catch (TypeError $ e ) {
23+ echo $ e ->getMessage (), "\n" ;
24+ }
25+
26+ session_write_close ();
27+
28+ try {
29+ session_start ();
30+ } catch (Throwable $ e ) {
31+ echo $ e ->getMessage (), "\n" ;
32+ }
33+ ?>
34+ --EXPECTF--
35+ Session id must be a string
You can’t perform that action at this time.
0 commit comments