From: Andrey Hristov Date: Mon, 9 May 2005 21:48:03 +0000 (+0000) Subject: MFB X-Git-Tag: php-5.0.1b1~275 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d5e0b8a6288b1be99cbe9dd622ed8aa03fcdae35;p=php MFB --- diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index 2af004d694..42595223ee 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -1269,6 +1269,10 @@ PHP_FUNCTION(mysqli_prepare) return; } MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link"); + if (mysql->mysql->status == MYSQL_STATUS_GET_RESULT) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "All data must be fetched before a new statement prepare takes place"); + RETURN_FALSE; + } stmt = (MY_STMT *)ecalloc(1,sizeof(MY_STMT));