From 6f7798b6434f5ef6073447998c436901b507e3df Mon Sep 17 00:00:00 2001 From: Rasmus Lerdorf Date: Tue, 7 May 2013 00:35:10 -0700 Subject: Fixing bugs found by static analysis --- lib/MiniTemplator.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/MiniTemplator.class.php') diff --git a/lib/MiniTemplator.class.php b/lib/MiniTemplator.class.php index 69281cb5e..a139473f9 100644 --- a/lib/MiniTemplator.class.php +++ b/lib/MiniTemplator.class.php @@ -336,7 +336,7 @@ function processBeginBlockCmd ($parms, $cmdTPosBegin, $cmdTPosEnd) { $this->openBlocksTab[$this->currentNestingLevel] = $blockNo; $this->currentNestingLevel += 1; if ($this->currentNestingLevel > $this->maxNestingLevel) { - $trhis->triggerError ("Block nesting overflow in template at offset $cmdTPosBegin."); + $this->triggerError ("Block nesting overflow in template at offset $cmdTPosBegin."); return false; } return true; } @@ -844,7 +844,7 @@ function readFileIntoString ($fileName, &$s) { $fh = fopen($fileName,"rb"); if ($fh === false) return false; $fileSize = filesize($fileName); - if ($fileSize === false) {close ($fh); return false; } + if ($fileSize === false) {fclose ($fh); return false; } $s = fread($fh,$fileSize); fclose ($fh); if (strlen($s) != $fileSize) return false; -- cgit v1.2.3