1
0
Fork 0

Merge pull request #2101 from e1en0r/patch-1

Allow whitespace in installers - fix for issue #2071
pull/2118/head
Jordi Boggiano 2013-07-26 04:30:07 -07:00
commit 1d91e43587
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ class InstallerInstaller extends LibraryInstaller
foreach ($classes as $class) {
if (class_exists($class, false)) {
$code = file_get_contents($classLoader->findFile($class));
$code = preg_replace('{^class\s+(\S+)}mi', 'class $1_composer_tmp'.self::$classCounter, $code);
$code = preg_replace('{^(\s*)class\s+(\S+)}mi', '$1class $2_composer_tmp'.self::$classCounter, $code);
eval('?>'.$code);
$class .= '_composer_tmp'.self::$classCounter;
self::$classCounter++;