mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
26 lines
424 B
PHP
26 lines
424 B
PHP
--TEST--
|
|
SQLite3 user authorizer null
|
|
--EXTENSIONS--
|
|
sqlite3
|
|
--FILE--
|
|
<?php
|
|
|
|
$db = new SQLite3(':memory:');
|
|
$db->enableExceptions(true);
|
|
|
|
$db->setAuthorizer(null);
|
|
|
|
// This query should be accepted
|
|
var_dump($db->querySingle('SELECT 1;'));
|
|
|
|
try {
|
|
// This one should fail
|
|
var_dump($db->querySingle('CREATE TABLE test (a, b);'));
|
|
} catch (\Exception $e) {
|
|
echo $e->getMessage() . "\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
int(1)
|
|
NULL
|