mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Convert E_ERROR to Error exception in mysqli_result iterator
The same condition uses Error exceptions in lots of other classes.
This commit is contained in:
parent
9d3c6665ab
commit
950ea89fb0
1 changed files with 3 additions and 1 deletions
|
@ -45,8 +45,10 @@ zend_object_iterator *php_mysqli_result_get_iterator(zend_class_entry *ce, zval
|
|||
php_mysqli_result_iterator *iterator;
|
||||
|
||||
if (by_ref) {
|
||||
zend_error(E_ERROR, "An iterator cannot be used with foreach by reference");
|
||||
zend_throw_error(NULL, "An iterator cannot be used with foreach by reference");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
iterator = ecalloc(1, sizeof(php_mysqli_result_iterator));
|
||||
zend_iterator_init(&iterator->intern);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue