summaryrefslogtreecommitdiff
path: root/ext/mysqli/mysqli_api.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2011-09-05 15:29:45 +0000
committerAndrey Hristov <andrey@php.net>2011-09-05 15:29:45 +0000
commit5308ed60f3f2ceb60deefe68a3adc846fea6308b (patch)
treeba4455ffc68ed82fddaa2114328836ae2ae9ae07 /ext/mysqli/mysqli_api.c
parentf2493615590ad33477e9a7804a6a1e89c383ba46 (diff)
downloadphp-git-5308ed60f3f2ceb60deefe68a3adc846fea6308b.tar.gz
Fix for Bug #55582 mysqli_num_rows() returns always 0 for unbuffered, when mysqlnd is used
Diffstat (limited to 'ext/mysqli/mysqli_api.c')
-rw-r--r--ext/mysqli/mysqli_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c
index 041875480c..e20d963fbb 100644
--- a/ext/mysqli/mysqli_api.c
+++ b/ext/mysqli/mysqli_api.c
@@ -1612,7 +1612,7 @@ PHP_FUNCTION(mysqli_num_rows)
}
MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, &mysql_result, "mysqli_result", MYSQLI_STATUS_VALID);
- if (mysqli_result_is_unbuffered(result)) {
+ if (mysqli_result_is_unbuffered_and_not_everything_is_fetched(result)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Function cannot be used with MYSQL_USE_RESULT");
RETURN_LONG(0);
}