Permalink
Browse files

fixed intl functions when intl is not enabled

  • Loading branch information...
1 parent 3f39504 commit 10b8ddf1ff49238ae2c046e2f6d54b88f536e5ff @fabpot fabpot committed Jul 5, 2011
Showing with 8 additions and 3 deletions.
  1. +8 −3 app/autoload.php
View
@@ -19,9 +19,14 @@
'Twig_Extensions_' => __DIR__.'/../vendor/twig-extensions/lib',
'Twig_' => __DIR__.'/../vendor/twig/lib',
));
-$loader->registerPrefixFallbacks(array(
- __DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs',
-));
+
+// intl
+if (!function_exists('intl_get_error_code')) {
+ require_once __DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php';
+
+ $loader->registerPrefixFallbacks(array(__DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs'));
+}
+
$loader->registerNamespaceFallbacks(array(
__DIR__.'/../src',
));

0 comments on commit 10b8ddf

Please sign in to comment.