Browse Source

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

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1593 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
master
Xuefer 6 years ago
parent
commit
25691273b3
  1. 2
      devel/sample.cpp.php
  2. 10
      lib/Decompiler.class.php

2
devel/sample.cpp.php

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

10
lib/Decompiler.class.php

@ -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;
}

Loading…
Cancel
Save