Skip to content

Commit 555e30d

Browse files
committed
Avoid array_filter incompatibility
1 parent 5869750 commit 555e30d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/JsPhpize/Compiler/Helpers/DotWithArrayPrototype.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function ($base) {
1212
}
1313
if ($key === 'filter') {
1414
return function ($callback, $flag = 0) use ($base) {
15-
return array_filter($base, $callback, $flag);
15+
return func_num_args() === 1 ? array_filter($base, $callback) : array_filter($base, $callback, $flag);
1616
};
1717
}
1818
if ($key === 'pop') {

0 commit comments

Comments
 (0)