summaryrefslogtreecommitdiff
path: root/ext/sqlite3/sqlite3.c
diff options
context:
space:
mode:
authorGeorge Peter Banyard <girgias@php.net>2020-09-11 18:10:38 +0200
committerGeorge Peter Banyard <girgias@php.net>2020-09-12 22:37:04 +0200
commit67d21bf237e45457336a545cef01c552e9a5a1f4 (patch)
treee0c5752c644b59bc3c562f8d4ddd66a50b7f36a5 /ext/sqlite3/sqlite3.c
parent1f118aa24c5f2807ec16e140e000555f92d48e93 (diff)
downloadphp-git-67d21bf237e45457336a545cef01c552e9a5a1f4.tar.gz
Use Error for uninitialized SQLite object
Closes GH-6113
Diffstat (limited to 'ext/sqlite3/sqlite3.c')
-rw-r--r--ext/sqlite3/sqlite3.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c
index b06f723b4c..464df5ae21 100644
--- a/ext/sqlite3/sqlite3.c
+++ b/ext/sqlite3/sqlite3.c
@@ -63,14 +63,14 @@ static void php_sqlite3_error(php_sqlite3_db_object *db_obj, char *format, ...)
#define SQLITE3_CHECK_INITIALIZED(db_obj, member, class_name) \
if (!(db_obj) || !(member)) { \
- php_sqlite3_error(db_obj, "The " #class_name " object has not been correctly initialised"); \
- RETURN_FALSE; \
+ zend_throw_error(NULL, "The " #class_name " object has not been correctly initialised or is already closed"); \
+ RETURN_THROWS(); \
}
#define SQLITE3_CHECK_INITIALIZED_STMT(member, class_name) \
if (!(member)) { \
- php_error_docref(NULL, E_WARNING, "The " #class_name " object has not been correctly initialised"); \
- RETURN_FALSE; \
+ zend_throw_error(NULL, "The " #class_name " object has not been correctly initialised or is already closed"); \
+ RETURN_THROWS(); \
}
/* {{{ PHP_INI */