Skip to content

Instantly share code, notes, and snippets.

@blackheaven
Created December 26, 2013 09:05
Show Gist options
  • Save blackheaven/8131479 to your computer and use it in GitHub Desktop.
Save blackheaven/8131479 to your computer and use it in GitHub Desktop.
Why I don't like dynamic types systems.
<?php
// web/index.php in Silex
// ..
$app->register(new Silex\Provider\TranslationServiceProvider(), array(
'locale' => array('fr'), // Instead of 'locale' => 'fr',
));
Warning: Illegal offset type in /.../vendor/symfony/translation/Symfony/Component/Translation/Translator.php on line 99
Warning: Illegal offset type in unset in /.../vendor/symfony/translation/Symfony/Component/Translation/Translator.php on line 104
Warning: Illegal offset type in /.../vendor/symfony/translation/Symfony/Component/Translation/Translator.php on line 99
Warning: Illegal offset type in unset in /.../vendor/symfony/translation/Symfony/Component/Translation/Translator.php on line 104
// Instead of having something in web/index.php where the error comes from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment