From 2f3e330ad00522fc007a48132195e44dd47252ed Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Sun, 15 Apr 2007 16:50:42 +0000 Subject: Fixed bug #40935 (pdo_mysql does not raise an exception on empty fetchAll()). --- NEWS | 2 ++ ext/pdo_mysql/mysql_statement.c | 1 + 2 files changed, 3 insertions(+) diff --git a/NEWS b/NEWS index 5a4fa7506d..399147ab9b 100644 --- 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 diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c index aae7019dc5..087194f7f7 100755 --- a/ext/pdo_mysql/mysql_statement.c +++ b/ext/pdo_mysql/mysql_statement.c @@ -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) { -- cgit v1.2.1