mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00

* Deprecate warnings in SQLite3, change returned exception class to SQLite3Exception RFC: https://wiki.php.net/rfc/sqlite3_exceptions Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>
29 lines
527 B
PHP
29 lines
527 B
PHP
--TEST--
|
|
SQLite3::loadExtension with empty extension test
|
|
--CREDITS--
|
|
Jelle Lampaert
|
|
#Belgian Testfest 2009
|
|
--INI--
|
|
sqlite3.extension_dir="{TMP}"
|
|
--EXTENSIONS--
|
|
sqlite3
|
|
--SKIPIF--
|
|
<?php
|
|
if (!method_exists('SQLite3', 'loadExtension')) {
|
|
die("skip if SQLITE_OMIT_LOAD_EXTENSION defined");
|
|
}
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$db = new SQLite3(':memory:');
|
|
|
|
try {
|
|
$db->loadExtension("");
|
|
} catch (\Throwable $ex) {
|
|
var_dump($ex->getMessage());
|
|
}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
string(61) "SQLite3::loadExtension(): Argument #1 ($name) cannot be empty"
|