From a1e444fdfd2b1b712446bbb8ad63bd264e0fb7ce Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 13 Oct 2014 12:21:53 +0000 Subject: [PATCH] fix non-fatal PHP Parse error, when $j was used eg. in onload --- etemplate/inc/class.boetemplate.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/etemplate/inc/class.boetemplate.inc.php b/etemplate/inc/class.boetemplate.inc.php index bed766271c..5f617016bf 100644 --- a/etemplate/inc/class.boetemplate.inc.php +++ b/etemplate/inc/class.boetemplate.inc.php @@ -225,7 +225,9 @@ class boetemplate extends soetemplate $name = str_replace($matches[3],$value,$name); } } - if (eval($code='$name = "'.str_replace(array('\\', '"'), array('\\\\', '\\"'), $name).'";') === false) + if (eval($code='$name = "'.str_replace(array('\\', '"'), array('\\\\', '\\"'), + // fix non-fatal PHP Parse error, when $j was used eg. in onload + str_replace(array('$j.', '$j('), array('jQuery.', 'jQuery('), $name)).'";') === false) { error_log(__METHOD__."(name='$name', c='$c', row=$row, c_='$c_', row_=$row_, ...) line ".__LINE__." ERROR parsing: $code"); error_log(function_backtrace());