Przeglądaj źródła

includeIfExists function now works properly(return false now)

Pavel Savinov 12 lat temu
rodzic
commit
2cb697a4bb
1 zmienionych plików z 1 dodań i 3 usunięć
  1. 1 3
      src/bootstrap.php

+ 1 - 3
src/bootstrap.php

@@ -12,9 +12,7 @@
 
 function includeIfExists($file)
 {
-    if (file_exists($file)) {
-        return include $file;
-    }
+    return file_exists($file)===true ? include $file : false;
 }
 
 if ((!$loader = includeIfExists(__DIR__.'/../vendor/autoload.php')) && (!$loader = includeIfExists(__DIR__.'/../../../autoload.php'))) {