php-src/ext/sqlite3/tests/sqlite3_33_load_extension_param.phpt
BohwaZ ddd9a08f56
[RFC] Transition SQLite3 to exceptions (#11058)
* 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>
2023-07-03 14:30:52 +01:00

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"