From: Anatol Belski Date: Fri, 16 Jan 2015 10:37:25 +0000 (+0100) Subject: fix format strings, resource handle is int X-Git-Tag: PRE_PHP7_REMOVALS~25^2~120^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=22bb3ce61a895f77178078da4a7e29cb39a532a7;p=php fix format strings, resource handle is int --- diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c index 39fc304320..59ed713c1c 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);