- Fixed possible crash when calling SQLiteDatabase::{ArrayQuery, SingleQuery} methods using Reflection

This commit is contained in:
Felipe Pena 2009-10-12 19:04:00 +00:00
parent b394a75ad5
commit 16be0343d7
2 changed files with 24 additions and 1 deletions

View file

@ -129,7 +129,7 @@ PHP_INI_END()
#define RES_FROM_OBJECT(res, object) RES_FROM_OBJECT_RESTORE_ERH(res, object, NULL)
#define PHP_SQLITE_EMPTY_QUERY \
if (!sql_len) { \
if (!sql_len || !*sql) { \
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot execute empty query."); \
RETURN_FALSE; \
}