projects
/
pear
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
07edd6f
)
isset check only on non-function
author
Alan Knowles
<alan@roojs.com>
Mon, 28 Aug 2023 08:51:14 +0000
(16:51 +0800)
committer
Alan Knowles
<alan@roojs.com>
Mon, 28 Aug 2023 08:51:14 +0000
(16:51 +0800)
HTML/Template/Flexy/Compiler/Flexy.php
patch
|
blob
|
history
diff --git
a/HTML/Template/Flexy/Compiler/Flexy.php
b/HTML/Template/Flexy/Compiler/Flexy.php
index
6e41a6a
..
bd561d8
100644
(file)
--- a/
HTML/Template/Flexy/Compiler/Flexy.php
+++ b/
HTML/Template/Flexy/Compiler/Flexy.php
@@
-460,8
+460,12
@@
class HTML_Template_Flexy_Compiler_Flexy extends HTML_Template_Flexy_Compiler {
if ($this->is_a($loopon, 'PEAR_Error')) {
return $loopon;
}
-
- $ret = 'if (isset('.$loopon .') && ( ' .
+ $isset = '';
+ // we can check value exists only if it's not a function call..
+ if (strpos($loopon,'(' ) === false) {
+ $isset = 'isset('.$loopon .') && ';
+ }
+ $ret = 'if (' . $isset . '( ' .
'$this->options[\'strict\'] || ' .
'is_array('. $loopon. ') || ' .
'is_object(' . $loopon . '))) ' .