Skip to content

Commit

Permalink
check file_exists
Browse files Browse the repository at this point in the history
php7 errors.
  • Loading branch information
Artistan authored Apr 12, 2018
1 parent 97b91b5 commit 0acaa6f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Savant3.php
Original file line number Diff line number Diff line change
Expand Up @@ -1067,9 +1067,11 @@ public function fetch($tpl = null)
// silence errors in the filters. Hendy Irawan provided
// the next three lines as a "verbose" fix.
ob_start();
include $this->__config['fetch'];
if(file_exists($this->__config['fetch'])) {
include $this->__config['fetch'];
}
echo $this->applyFilters(ob_get_clean());
} else {
} else if(file_exists($this->__config['fetch'])) {
// no filters being used.
include $this->__config['fetch'];
}
Expand Down Expand Up @@ -1227,7 +1229,7 @@ protected function applyFilters($buffer)
// load the Savant3_Filter_*.php resource
$file = $callback[0] . '.php';
$result = $this->findFile('resource', $file);
if ($result) {
if (file_exists($result)) {
include_once $result;
}
}
Expand Down Expand Up @@ -1334,4 +1336,4 @@ public function isError($obj)
}
}
}
?>
?>

0 comments on commit 0acaa6f

Please sign in to comment.