From a227523c4f61db01aaef3d1830d1e46422290d42 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sun, 20 Jul 2014 00:07:58 +0200 Subject: [PATCH] Fix php_strip_whitespace bugginess, fixes #3030 --- src/Composer/Autoload/ClassMapGenerator.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Composer/Autoload/ClassMapGenerator.php b/src/Composer/Autoload/ClassMapGenerator.php index e74ecd108..8f45adee8 100644 --- a/src/Composer/Autoload/ClassMapGenerator.php +++ b/src/Composer/Autoload/ClassMapGenerator.php @@ -115,7 +115,7 @@ class ClassMapGenerator $traits = version_compare(PHP_VERSION, '5.4', '<') ? '' : '|trait'; try { - $contents = php_strip_whitespace($path); + $contents = @php_strip_whitespace($path); } catch (\Exception $e) { throw new \RuntimeException('Could not scan for classes inside '.$path.": \n".$e->getMessage(), 0, $e); } @@ -160,8 +160,8 @@ class ClassMapGenerator } else { $name = $matches['name'][$i]; if ($name[0] === ':') { - // This is an XHP class, https://github.com/facebook/xhp - $name = 'xhp'.substr(str_replace(array('-', ':'), array('_', '__'), $name), 1); + // This is an XHP class, https://github.com/facebook/xhp + $name = 'xhp'.substr(str_replace(array('-', ':'), array('_', '__'), $name), 1); } $classes[] = ltrim($namespace . $name, '\\'); }