1
0
Fork 0

eval requires "()"; show code for dangling array(..)

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1593 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
This commit is contained in:
Xuefer 2015-04-24 13:14:08 +00:00
parent 95da04c9f2
commit 25691273b3
2 changed files with 10 additions and 2 deletions

View File

@ -702,5 +702,7 @@ $callback = function($quantity, $product) use($tax, &$total) {
#endif
exit();
exit(1);
array(eval('array 1'));
array();
?>

View File

@ -2190,7 +2190,13 @@ class Decompiler
case XC_INCLUDE_OR_EVAL: // {{{
$type = ZEND_ENGINE_2_4 ? $ext : $op2['var']; // hack
$keyword = $this->includeTypes[$type];
$resvar = "$keyword " . str($this->getOpVal($op1, $EX));
$rvalue = str($this->getOpVal($op1, $EX));
if ($type == ZEND_EVAL) {
$resvar = "$keyword($rvalue)";
}
else {
$resvar = "$keyword $rvalue";
}
break;
// }}}
case XC_FE_RESET: // {{{
@ -2233,7 +2239,7 @@ class Decompiler
// }}}
case XC_FREE: // {{{
$free = $T[$op1['var']];
if (!is_a($free, 'Decompiler_Array') && !is_a($free, 'Decompiler_Box')) {
if (!is_a($free, 'Decompiler_Box')) {
$op['php'] = is_object($free) ? $free : $this->unquote($free, '(', ')');
$lastphpop = &$op;
}