فهرست منبع

Do set_include_path only if any package define include paths.

Christoph Hochstrasser 13 سال پیش
والد
کامیت
68c12c3516
1فایلهای تغییر یافته به همراه4 افزوده شده و 2 حذف شده
  1. 4 2
      src/Composer/Autoload/AutoloadGenerator.php

+ 4 - 2
src/Composer/Autoload/AutoloadGenerator.php

@@ -36,9 +36,11 @@ if (!class_exists('Composer\\Autoload\\ClassLoader', false)) {
 }
 
 $includePaths = require __DIR__.'/include_paths.php';
-array_unshift($includePaths, get_include_path());
 
-set_include_path(join(PATH_SEPARATOR, $includePaths));
+if ($includePaths) {
+    array_unshift($includePaths, get_include_path());
+    set_include_path(join(PATH_SEPARATOR, $includePaths));
+}
 
 return call_user_func(function() {
     $loader = new \Composer\Autoload\ClassLoader();