]> git.andy128k.dev Git - ipf.git/commitdiff
show syntax errors in views
authorAndrey Kutejko <andy128k@gmail.com>
Sun, 4 Aug 2013 10:40:16 +0000 (13:40 +0300)
committerAndrey Kutejko <andy128k@gmail.com>
Sun, 4 Aug 2013 10:40:16 +0000 (13:40 +0300)
ipf.php

diff --git a/ipf.php b/ipf.php
index d51e9c16b9ba4ce93789f9a0f7d6b11615ede9fc..01d2a2a471e1fcd3a0fecc57bf4dcb6c6c69175b 100644 (file)
--- a/ipf.php
+++ b/ipf.php
@@ -106,6 +106,12 @@ final class IPF
         return $default;
     }
 
+    private static function include_existing($filename)
+    {
+        if (is_file($filename))
+            include_once $filename;
+    }
+
     public static function loadFunction($function)
     {
         if (function_exists($function))
@@ -117,8 +123,10 @@ final class IPF
         $elts = explode('_', $function);
         array_pop($elts);
         $file = '/' . strtolower(implode(DIRECTORY_SEPARATOR, $elts)).'.php';
-        @include_once IPF::$settings['ipf_path'] . $file;
-        @include_once IPF::$settings['project_path'] . $file;
+
+        self::include_existing(IPF::$settings['ipf_path'] . $file);
+        self::include_existing(IPF::$settings['project_path'] . $file);
+
         if (!function_exists($function))
             throw new IPF_Exception('Impossible to load the function: '.$function.' in '.$file);
     }