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 <ebert.ch...@gmail.com>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: fw-general@lists.zend.com > Info: http://framework.zend.com/archives > Unsubscribe: fw-general-unsubscr...@lists.zend.com > > >