]> granicus.if.org Git - php/commitdiff
MFB (1.82.2.31.2.17.2.10): "Added a warning message on pdo::exec() failure in the...
authorMatt Wilmas <mattwil@php.net>
Wed, 3 Dec 2008 00:08:37 +0000 (00:08 +0000)
committerMatt Wilmas <mattwil@php.net>
Wed, 3 Dec 2008 00:08:37 +0000 (00:08 +0000)
ext/pdo/pdo_dbh.c

index b0e242ccad2e125ab518108b403e23bba28f86bd..9d4b63de85f72fcba74b83cedc1001d6e2a61759 100755 (executable)
@@ -930,6 +930,7 @@ static PHP_METHOD(PDO, exec)
        }
 
        if (!statement_len) {
+               pdo_raise_impl_error(dbh, NULL, "HY000",  "trying to execute an empty query" TSRMLS_CC);
                RETURN_FALSE;
        }
        PDO_DBH_CLEAR_ERR();