diff options
-rw-r--r-- | NEWS | 2 | ||||
-rwxr-xr-x | ext/pdo_mysql/mysql_statement.c | 1 |
2 files changed, 3 insertions, 0 deletions
@@ -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) { |