Quellcode durchsuchen

includeIfExists function now works properly(return false now)

Pavel Savinov vor 12 Jahren
Ursprung
Commit
2cb697a4bb
1 geänderte Dateien mit 1 neuen und 3 gelöschten Zeilen
  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'))) {