Added a warning message on pdo::exec() failure in the event of an empty query

This commit is contained in:
Ilia Alshanetsky 2008-04-22 13:01:45 +00:00
parent 4c4542e0d5
commit 3bcf8a3d00

View File

@ -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();