diff options
author | Johannes Schlüter <johannes@php.net> | 2009-02-18 16:34:47 +0000 |
---|---|---|
committer | Johannes Schlüter <johannes@php.net> | 2009-02-18 16:34:47 +0000 |
commit | b489d3a69fcea9c8a79cb0cf00a09f8d9fd7d058 (patch) | |
tree | 2e2e0945e2a5a17885ab0004e11697d5c83c78cc /ext/mysql/php_mysql.c | |
parent | 42bb8ed2b55d45f404050e019eb12a1952e4eb93 (diff) | |
download | php-git-b489d3a69fcea9c8a79cb0cf00a09f8d9fd7d058.tar.gz |
MFH: Fix #47438 mysql_fetch_field ignores zero offse
Diffstat (limited to 'ext/mysql/php_mysql.c')
-rw-r--r-- | ext/mysql/php_mysql.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c index b7fd650446..56301d9b15 100644 --- a/ext/mysql/php_mysql.c +++ b/ext/mysql/php_mysql.c @@ -2318,7 +2318,7 @@ PHP_FUNCTION(mysql_fetch_field) ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, &result, -1, "MySQL result", le_result); - if (field) { + if (ZEND_NUM_ARGS() > 1) { if (field<0 || field>=(int)mysql_num_fields(mysql_result)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad field offset"); RETURN_FALSE; |