php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #54978
Patch mysql_query_true_patch.txt revision 2011-06-02 15:39 UTC by radu dot dineiu at gmail dot com

Patch mysql_query_true_patch.txt for MySQL related Bug #54978

Patch version 2011-06-02 15:39 UTC

Return to Bug #54978 | Download this patch
Patch Revisions:

Developer: radu.dineiu@gmail.com

--- ext/mysql/php_mysql.c	2011-06-02 18:33:18.000000000 +0300
+++ ext/mysql/php_mysql_patched.c	2011-06-02 18:33:12.000000000 +0300
@@ -1482,6 +1482,9 @@
 		if (PHP_MYSQL_VALID_RESULT(mysql->conn)) { /* query should have returned rows */
 			php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to save result set");
 			RETURN_FALSE;
+		} else if (mysql_errno(mysql->conn) != 0) {
+			php_error_docref("http://www.mysql.com/doc" TSRMLS_CC, E_WARNING, "%s", mysql_error(mysql->conn));
+			RETURN_FALSE;
 		} else {
 			RETURN_TRUE;
 		}
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 21:01:29 2024 UTC