Skip to content

Commit

Permalink
This appears to fix #453, #498, #499 and possibly more issues. Will n…
Browse files Browse the repository at this point in the history
…eed further testing and unit tests.
  • Loading branch information
wisskid committed Jan 27, 2020
1 parent 4b29dfc commit 34763ae
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions libs/sysplugins/smarty_internal_templatecompilerbase.php
Expand Up @@ -627,16 +627,8 @@ public function compilePHPFunctionCall($name, $parameter)
if (count($parameter) === 0) {
$this->trigger_template_error('Illegal number of parameter in "isset()"');
}
if ($parHasFuction) {
$pa = array();
foreach ($parameter as $p) {
$pa[] = (strpos($p, '(') === false) ? ('isset(' . $p . ')') : ('(' . $p . ' !== null )');
}
return '(' . implode(' && ', $pa) . ')';
} else {
$isset_par = str_replace("')->value", "',null,true,false)->value", $par);
}
return $name . '(' . $isset_par . ')';
$isset_par = str_replace("')->value", "',null,true,false)->value", $par);
return '@!is_null(' . $isset_par . ')';
} elseif (in_array(
$func_name,
array(
Expand Down

0 comments on commit 34763ae

Please sign in to comment.