mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-16 12:26:30 +00:00
More PHP 5.2 compatibility.
This commit is contained in:
@@ -157,8 +157,8 @@ zval *TWIG_GET_ARRAYOBJECT_ELEMENT(zval *object, zval *offset)
|
|||||||
|
|
||||||
zval_ptr_dtor(&offset);
|
zval_ptr_dtor(&offset);
|
||||||
|
|
||||||
if (UNEXPECTED(!retval)) {
|
if (!retval) {
|
||||||
if (UNEXPECTED(!EG(exception))) {
|
if (!EG(exception)) {
|
||||||
zend_error_noreturn(E_ERROR, "Undefined offset for object of type %s used as array", ce->name);
|
zend_error_noreturn(E_ERROR, "Undefined offset for object of type %s used as array", ce->name);
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -180,8 +180,8 @@ int TWIG_ISSET_ARRAYOBJECT_ELEMENT(zval *object, zval *offset)
|
|||||||
|
|
||||||
zval_ptr_dtor(&offset);
|
zval_ptr_dtor(&offset);
|
||||||
|
|
||||||
if (UNEXPECTED(!retval)) {
|
if (!retval) {
|
||||||
if (UNEXPECTED(!EG(exception))) {
|
if (!EG(exception)) {
|
||||||
zend_error_noreturn(E_ERROR, "Undefined offset for object of type %s used as array", ce->name);
|
zend_error_noreturn(E_ERROR, "Undefined offset for object of type %s used as array", ce->name);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user