Download src/php/php-src/ext/mysqli/tests/bug33491.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 759 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/mysqli/tests/bug33491.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/mysqli/tests/bug33491.phpt
-
curl -L -o bug33491.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/mysqli/tests/bug33491.phpt
759 Bytes
| --TEST-- | |
| Bug #33491 (extended mysqli class crashes when result is not object) | |
| --INI-- | |
| error_reporting=1 | |
| --EXTENSIONS-- | |
| mysqli | |
| --SKIPIF-- | |
| require_once 'skipifconnectfailure.inc'; | |
| --FILE-- | |
| class DB extends mysqli | |
| { | |
| public function query_single($query) { | |
| $result = parent::query($query); | |
| $result->fetch_row(); // <- Here be crash | |
| } | |
| } | |
| require_once 'connect.inc'; | |
| // Segfault when using the DB class which extends mysqli | |
| $DB = new DB($host, $user, $passwd, $db, $port, $socket); | |
| $DB->query_single('SELECT DATE()'); | |
| --EXPECTF-- | |
| Fatal error: Uncaught Error: Call to a member function fetch_row() on false in %sbug33491.php:%d | |
| Stack trace: | |
| #0 %s(%d): DB->query_single('SELECT DATE()') | |
| #1 {main} | |
| thrown in %sbug33491.php on line %d | |