From 68c12c351677a4363f31d36d2f244cf55de072c8 Mon Sep 17 00:00:00 2001 From: Christoph Hochstrasser Date: Wed, 4 Apr 2012 09:48:49 +0200 Subject: [PATCH] Do set_include_path only if any package define include paths. --- src/Composer/Autoload/AutoloadGenerator.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Composer/Autoload/AutoloadGenerator.php b/src/Composer/Autoload/AutoloadGenerator.php index 0278d48f8..d92080ea5 100644 --- a/src/Composer/Autoload/AutoloadGenerator.php +++ b/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();