Download src/php/php-src/ext/session/tests/bug24592.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 571 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/session/tests/bug24592.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/session/tests/bug24592.phpt
-
curl -L -o bug24592.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/session/tests/bug24592.phpt
571 Bytes
| --TEST-- | |
| Bug #24592 (crash when multiple NULL values are being stored) | |
| --EXTENSIONS-- | |
| session | |
| --SKIPIF-- | |
| include('skipif.inc'); | |
| --INI-- | |
| html_errors=0 | |
| session.save_handler=files | |
| --FILE-- | |
| @session_start(); | |
| $foo = $_SESSION['foo']; | |
| $bar = $_SESSION['bar']; | |
| var_dump($foo, $bar, $_SESSION); | |
| $_SESSION['foo'] = $foo; | |
| $_SESSION['bar'] = $bar; | |
| var_dump($_SESSION); | |
| --EXPECTF-- | |
| Warning: Undefined array key "foo" in %s on line %d | |
| Warning: Undefined array key "bar" in %s on line %d | |
| NULL | |
| NULL | |
| array(0) { | |
| } | |
| array(2) { | |
| ["foo"]=> | |
| NULL | |
| ["bar"]=> | |
| NULL | |
| } | |