]> granicus.if.org Git - php/commitdiff
Fixed bug #40935 (pdo_mysql does not raise an exception on empty
authorIlia Alshanetsky <iliaa@php.net>
Sun, 15 Apr 2007 16:50:42 +0000 (16:50 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sun, 15 Apr 2007 16:50:42 +0000 (16:50 +0000)
fetchAll()).

NEWS
ext/pdo_mysql/mysql_statement.c

diff --git a/NEWS b/NEWS
index 5a4fa7506dfcdeb041743395ecdd0b9dc0593f64..399147ab9b9e5a52e76add8f6b258b5956554fb9 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,8 @@ PHP                                                                        NEWS
   (Johannes)
 - Fixed bug #41034 (json_encode() ignores null byte started keys in arrays).
   (Ilia)
+- Fixed bug #40935 (pdo_mysql does not raise an exception on empty
+  fetchAll()). (Ilia)
 - Fixed bug #40861 (strtotime() doesn't handle double negative relative time
   units correctly). (Derick)
 - Fixed bug #40290 (strtotime() returns unexpected result with particular
index aae7019dc5e1bc7f2c70dffc639c21b3cd42aa43..087194f7f7895419d1e964867b19564cbf49a1ce 100755 (executable)
@@ -413,6 +413,7 @@ static int pdo_mysql_stmt_fetch(pdo_stmt_t *stmt,
 #endif
 
        if (!S->result) {
+               strcpy(stmt->error_code, "HY000");
                return 0;       
        }
        if ((S->current_data = mysql_fetch_row(S->result)) == NULL) {