diff --git a/etemplate/inc/class.soetemplate.inc.php b/etemplate/inc/class.soetemplate.inc.php index 0329de16a8..2ed5887331 100644 --- a/etemplate/inc/class.soetemplate.inc.php +++ b/etemplate/inc/class.soetemplate.inc.php @@ -204,7 +204,7 @@ $this->db->query($sql,__LINE__,__FILE__); if (!$this->db->next_record()) { - return False; + return $this->readfile(); } $this->db2obj(); @@ -227,7 +227,7 @@ } $file .= '.xul'; - if ($this->name == '' || $app == '' || $name == '' || !is_readable($file) || !($f = fopen($file,'r'))) + if ($this->name == '' || $app == '' || $name == '' || !@file_exists($file) || !($f = @fopen($file,'r'))) { //echo "
Can't open '$file' !!!
\n"; return False;