From d93c3d17b2b94b11f89b00c2bf27b3e246af966a Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Sun, 18 May 2014 01:01:29 +0200 Subject: Getting rid of some notices / fixing _get_var_reference --- STECore.php | 5 ++--- STEStandardLibrary.php | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/STECore.php b/STECore.php index 0f81611..6bde63f 100644 --- a/STECore.php +++ b/STECore.php @@ -158,10 +158,9 @@ class STECore { return $nullref; } } else { - $old_varname = $varname; $bracket_close = strpos($name, "]", $bracket_open); if($bracket_close === false) { - throw new RuntimeError("Invalid varname \"$varname\". Missing closing \"]\"."); + throw new RuntimeError("Invalid varname \"$name\". Missing closing \"]\"."); } $varname = substr($name, 0, $bracket_open); $name = substr($name, $bracket_open + 1, $bracket_close - $bracket_open - 1) . substr($name, $bracket_close + 1); @@ -176,7 +175,7 @@ class STECore { $ref = &$this->_get_var_reference($from[$varname], $name, $create_if_not_exist); return $ref; } catch(Exception $e) { - throw new RuntimeError("Invalid varname \"$old_varname\". Missing closing \"]\"."); + throw new RuntimeError("Invalid varname \"$name\". Missing closing \"]\"."); } } } diff --git a/STEStandardLibrary.php b/STEStandardLibrary.php index a007d41..915b699 100644 --- a/STEStandardLibrary.php +++ b/STEStandardLibrary.php @@ -12,7 +12,7 @@ class STEStandardLibrary { } static public function escape($ste, $params, $sub) { - if($ste->evalbool($params["lines"])) { + if($ste->evalbool(@$params["lines"])) { return nl2br(htmlspecialchars(str_replace("\r\n", "\n", $sub($ste)))); } else { return htmlspecialchars($sub($ste)); -- cgit v1.2.3-54-g00ecf