TBH I think more fail-safe solution is without is_array check - considering the contract of config file - it should always return an array. You would discover an error if some in the file quicker.
On Wed, Oct 24, 2012 at 9:45 AM, Christian Ebert <[email protected]>wrote: > Hi Matus, > > great to hear. I modified my solution accordingly so that the logic is > similar to the global.php/local.php solution and more fail-safe. > > $appConfig = require 'config/application.config.php'; > > if(is_readable('config/application.config.local.php')){ > $localAppConfig = require 'config/application.config.local.php'; > if(is_array($localAppConfig)){ > $appConfig = > array_merge_recursive($appConfig,$localAppConfig); > } > } > > // Run the application! > Zend\Mvc\Application::init($appConfig)->run(); > > > -- > List: [email protected] > Info: http://framework.zend.com/archives > Unsubscribe: [email protected] > > >
