From 0acaa6f18304a7a4e7b37897abe5c94daf1938c9 Mon Sep 17 00:00:00 2001 From: Charles Peterson Date: Thu, 12 Apr 2018 15:06:29 -0500 Subject: [PATCH] check file_exists php7 errors. --- Savant3.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Savant3.php b/Savant3.php index cdcd473..460f7bb 100755 --- a/Savant3.php +++ b/Savant3.php @@ -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']; } @@ -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; } } @@ -1334,4 +1336,4 @@ public function isError($obj) } } } -?> \ No newline at end of file +?>