Permalink
Browse files

fixed autoloader when tests are run on a machine without intl installed

  • Loading branch information...
1 parent 97cb35b commit 8333df6161094b90c622077a1e229431342d365f @fabpot fabpot committed Jul 20, 2011
Showing with 5 additions and 3 deletions.
  1. +5 −3 autoload.php.dist
View
@@ -17,9 +17,11 @@ $loader->registerNamespaces(array(
$loader->registerPrefixes(array(
'Twig_' => __DIR__.'/vendor/twig/lib',
));
-$loader->registerPrefixFallbacks(array(
- __DIR__.'/src/Symfony/Component/Locale/Resources/stubs',
-));
+if (!function_exists('intl_get_error_code')) {
+ require_once __DIR__.'/src/Symfony/Component/Locale/Resources/stubs/functions.php';
+
+ $loader->registerPrefixFallbacks(array(__DIR__.'/src/Symfony/Component/Locale/Resources/stubs'));
+}
$loader->register();
AnnotationRegistry::registerLoader(function($class) use ($loader) {

0 comments on commit 8333df6

Please sign in to comment.