mirror of
https://github.com/php/php-src.git
synced 2024-12-02 14:24:10 +08:00
Added a warning message on pdo::exec() failure in the event of an empty query
This commit is contained in:
parent
4c4542e0d5
commit
3bcf8a3d00
@ -922,6 +922,7 @@ static PHP_METHOD(PDO, exec)
|
||||
}
|
||||
|
||||
if (!statement_len) {
|
||||
pdo_raise_impl_error(dbh, NULL, "HY000", "trying to execute and empty query" TSRMLS_CC);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
PDO_DBH_CLEAR_ERR();
|
||||
|
Loading…
Reference in New Issue
Block a user