1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 17:45:55 +00:00

Fixing bugs found by static analysis

This commit is contained in:
Rasmus Lerdorf
2013-05-07 00:35:10 -07:00
parent 2c967d6023
commit 6f7798b643
27 changed files with 103 additions and 104 deletions

View File

@@ -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;