mvc, oops, object of type Phalcon\Config can't be converted to string... so we'll have to check if the routing is an object or array to support both configurations

This commit is contained in:
Ad Schellevis 2018-03-06 14:04:20 +01:00
parent 582b201100
commit 9cbb08d765

View File

@ -101,7 +101,7 @@ class Routing
// we should consider some kind of caching here
//
$registered_modules = array();
$rootDirs = is_string($this->rootDir) ? array($this->rootDir) : $this->rootDir ;
$rootDirs = is_object($this->rootDir) || is_array($this->rootDir) ? $this->rootDir : array($this->rootDir);
foreach ($rootDirs as $rootDir) {
foreach (glob($rootDir."*", GLOB_ONLYDIR) as $namespace_base) {
foreach (glob($namespace_base."/*", GLOB_ONLYDIR) as $module_base) {