Fix crash in array_filter/array_map with a bad function

interp only
Esse commit está contido em:
mwilliams
2013-06-04 09:27:45 -07:00
commit de Sara Golemon
commit d62fddec07
3 arquivos alterados com 8 adições e 1 exclusões
+2 -1
Ver Arquivo
@@ -5900,6 +5900,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopFPushCtorD(PC& pc) {
}
inline void OPTBLD_INLINE VMExecutionContext::iopDecodeCufIter(PC& pc) {
PC origPc = pc;
NEXT();
DECODE_IA(itId);
DECODE(Offset, offset);
@@ -5922,7 +5923,7 @@ inline void OPTBLD_INLINE VMExecutionContext::iopDecodeCufIter(PC& pc) {
false);
if (f == nullptr) {
pc += offset;
pc = origPc + offset;
} else {
cit.setFunc(f);
if (obj) {
@@ -0,0 +1,4 @@
<?php
error_reporting(-1);
var_dump(array_filter(array(1,2,3), 'fizzle'));
@@ -0,0 +1,2 @@
HipHop Warning: array_filter() expects parameter 2 to be a valid callback in %s/test/slow/array_functions/bad_array_filter.php on line 4
NULL