php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #71198
Patch pecl-mysql-srcmp revision 2015-12-22 18:01 UTC by lnkvisitor dot ts at gmail dot com

Patch pecl-mysql-srcmp for mysql Bug #71198

Patch version 2015-12-22 18:01 UTC

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

Developer: lnkvisitor.ts@gmail.com

index 005fd77..c892c7d 100644
--- a/php_mysql.c
+++ b/php_mysql.c
@@ -2023,8 +2023,8 @@ Q: String or long first?
                                        mysql_field_seek(mysql_result, 0);
                                        while ((tmp_field = mysql_fetch_field(mysql_result))) {
                                                if ((!table_name ||
-                                                                       !strncasecmp(tmp_field->table, table_name, tmp_field->table_length)) &&
-                                                               !strncasecmp(tmp_field->name, field_name, tmp_field->name_length)) {
+                                                                       (tmp - Z_STRVAL_P(field) == tmp_field->table_length && !strncasecmp(tmp_field->table, table_name, tmp_field->table_length))) &&
+                                                               Z_STRLEN_P(field) == tmp_field->name_length && !strncasecmp(tmp_field->name, field_name, tmp_field->name_length)){
                                                        field_offset = i;
                                                        break;
                                                }
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 01:01:30 2024 UTC