diff options
-rw-r--r-- | ext/session/tests/bug31454.phpt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/session/tests/bug31454.phpt b/ext/session/tests/bug31454.phpt new file mode 100644 index 0000000000..85ada11589 --- /dev/null +++ b/ext/session/tests/bug31454.phpt @@ -0,0 +1,19 @@ +--TEST-- +bug #31454 (session_set_save_handler crashes PHP when supplied non-existent object ref) +--FILE-- +<?php + +session_set_save_handler( + array(&$arf, 'open'), + array(&$arf, 'close'), + array(&$arf, 'read'), + array(&$arf, 'write'), + array(&$arf, 'destroy'), + array(&$arf, 'gc')); + +echo "Done\n"; +?> +--EXPECTF-- + +Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s/bug31454.php on line %d +Done |