com php-src: fix format strings, resource handle is int: ext/mysql/php_mysql.c
| From: | Anatol Belski | Date: | Fri, 16 Jan 2015 10:40:15 +0000 |
| Subject: | com php-src: fix format strings, resource handle is int: ext/mysql/php_mysql.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-84134@lists.php.net to get a copy of this message | ||
Commit: 22bb3ce61a895f77178078da4a7e29cb39a532a7
Author: Anatol Belski <ab@php.net> Fri, 16 Jan 2015 11:37:25 +0100
Parents: ea689b96a7cc12f721aeb8938cfa6ebdb822edd5
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=22bb3ce61a895f77178078da4a7e29cb39a532a7
Log:
fix format strings, resource handle is int
Changed paths:
M ext/mysql/php_mysql.c
Diff:
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c
index 39fc304..59ed713 100644
--- a/ext/mysql/php_mysql.c
+++ b/ext/mysql/php_mysql.c
@@ -1947,7 +1947,7 @@ Q: String or long first?
ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);
if (row < 0 || row >= (int)mysql_num_rows(mysql_result)) {
- php_error_docref(NULL, E_WARNING, "Unable to jump to row %pd on MySQL result index
%pd", row, Z_RES_P(result)->handle);
+ php_error_docref(NULL, E_WARNING, "Unable to jump to row %pd on MySQL result index %d",
row, Z_RES_P(result)->handle);
RETURN_FALSE;
}
mysql_data_seek(mysql_result, row);
@@ -1977,7 +1977,7 @@ Q: String or long first?
i++;
}
if (!tmp_field) { /* no match found */
- php_error_docref(NULL, E_WARNING, "%s%s%s not found in MySQL result index %pd",
+ php_error_docref(NULL, E_WARNING, "%s%s%s not found in MySQL result index %d",
(table_name?table_name:""), (table_name?".":""), field_name,
Z_RES_P(result)->handle);
efree(field_name);
if (table_name) {
@@ -2293,7 +2293,7 @@ PHP_FUNCTION(mysql_data_seek)
ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);
if (offset < 0 || offset >= (int)mysql_num_rows(mysql_result)) {
- php_error_docref(NULL, E_WARNING, "Offset %pd is invalid for MySQL result index %pd (or the
query data is unbuffered)", offset, Z_RES_P(result)->handle);
+ php_error_docref(NULL, E_WARNING, "Offset %pd is invalid for MySQL result index %d (or the
query data is unbuffered)", offset, Z_RES_P(result)->handle);
RETURN_FALSE;
}
mysql_data_seek(mysql_result, offset);
@@ -2466,7 +2466,7 @@ PHP_FUNCTION(mysql_field_seek)
ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);
if (offset < 0 || offset >= (int)mysql_num_fields(mysql_result)) {
- php_error_docref(NULL, E_WARNING, "Field %pd is invalid for MySQL result index %pd",
offset, Z_RES_P(result)->handle);
+ php_error_docref(NULL, E_WARNING, "Field %pd is invalid for MySQL result index %d",
offset, Z_RES_P(result)->handle);
RETURN_FALSE;
}
mysql_field_seek(mysql_result, offset);
@@ -2498,7 +2498,7 @@ static void php_mysql_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result);
if (field < 0 || field >= (int)mysql_num_fields(mysql_result)) {
- php_error_docref(NULL, E_WARNING, "Field %pd is invalid for MySQL result index %pd",
field, Z_RES_P(result)->handle);
+ php_error_docref(NULL, E_WARNING, "Field %pd is invalid for MySQL result index %d",
field, Z_RES_P(result)->handle);
RETURN_FALSE;
}
mysql_field_seek(mysql_result, field);