Download src/php/php-src/ext/pdo_sqlite/tests/gh9032.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 598 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pdo_sqlite/tests/gh9032.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/pdo_sqlite/tests/gh9032.phpt
-
curl -L -o gh9032.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pdo_sqlite/tests/gh9032.phpt
598 Bytes
| --TEST-- | |
| SQLite3 authorizer crashes on NULL values | |
| --EXTENSIONS-- | |
| pdo_sqlite | |
| --INI-- | |
| open_basedir=. | |
| --FILE-- | |
| $db = new PDO("sqlite::memory:", null, null, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]); | |
| $db->exec('attach database \':memory:\' AS "db1"'); | |
| var_dump($db->exec('create table db1.r (id int)')); | |
| try { | |
| $st = $db->prepare('attach database :a AS "db2"'); | |
| $st->execute([':a' => ':memory:']); | |
| var_dump($db->exec('create table db2.r (id int)')); | |
| } catch (PDOException $ex) { | |
| echo $ex->getMessage(), PHP_EOL; | |
| } | |
| --EXPECT-- | |
| int(0) | |
| SQLSTATE[HY000]: General error: 23 not authorized | |