@@ -1256,6 +1256,10 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_CONST_HANDLER(ZEND_OPCODE
1256
1256
zend_hash_index_find(Z_ARRVAL_P(function_name), 0, (void **) &obj);
1257
1257
zend_hash_index_find(Z_ARRVAL_P(function_name), 1, (void **) &method);
1258
1258
1259
+ if (!obj || !method) {
1260
+ zend_error_noreturn(E_ERROR, "Array callback has to contain indices 0 and 1");
1261
+ }
1262
+
1259
1263
if (Z_TYPE_PP(obj) != IS_STRING && Z_TYPE_PP(obj) != IS_OBJECT) {
1260
1264
zend_error_noreturn(E_ERROR, "First array member is not a valid class name or object");
1261
1265
}
@@ -1558,6 +1562,10 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_TMP_HANDLER(ZEND_OPCODE_H
1558
1562
zend_hash_index_find(Z_ARRVAL_P(function_name), 0, (void **) &obj);
1559
1563
zend_hash_index_find(Z_ARRVAL_P(function_name), 1, (void **) &method);
1560
1564
1565
+ if (!obj || !method) {
1566
+ zend_error_noreturn(E_ERROR, "Array callback has to contain indices 0 and 1");
1567
+ }
1568
+
1561
1569
if (Z_TYPE_PP(obj) != IS_STRING && Z_TYPE_PP(obj) != IS_OBJECT) {
1562
1570
zend_error_noreturn(E_ERROR, "First array member is not a valid class name or object");
1563
1571
}
@@ -1722,6 +1730,10 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_VAR_HANDLER(ZEND_OPCODE_H
1722
1730
zend_hash_index_find(Z_ARRVAL_P(function_name), 0, (void **) &obj);
1723
1731
zend_hash_index_find(Z_ARRVAL_P(function_name), 1, (void **) &method);
1724
1732
1733
+ if (!obj || !method) {
1734
+ zend_error_noreturn(E_ERROR, "Array callback has to contain indices 0 and 1");
1735
+ }
1736
+
1725
1737
if (Z_TYPE_PP(obj) != IS_STRING && Z_TYPE_PP(obj) != IS_OBJECT) {
1726
1738
zend_error_noreturn(E_ERROR, "First array member is not a valid class name or object");
1727
1739
}
@@ -1919,6 +1931,10 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_CV_HANDLER(ZEND_OPCODE_HA
1919
1931
zend_hash_index_find(Z_ARRVAL_P(function_name), 0, (void **) &obj);
1920
1932
zend_hash_index_find(Z_ARRVAL_P(function_name), 1, (void **) &method);
1921
1933
1934
+ if (!obj || !method) {
1935
+ zend_error_noreturn(E_ERROR, "Array callback has to contain indices 0 and 1");
1936
+ }
1937
+
1922
1938
if (Z_TYPE_PP(obj) != IS_STRING && Z_TYPE_PP(obj) != IS_OBJECT) {
1923
1939
zend_error_noreturn(E_ERROR, "First array member is not a valid class name or object");
1924
1940
}
0 commit comments