Hi. I build multi-module app. I get an exception "Invalid module definition". Problem is in class Phalcon/Mvc/Application, handle method (phalocn 4.0.6). When i attach event "application:beforeStartModule" with code

$this->di->get('eventsManager')->attach('application:beforeStartModule', function ($event, $app, $moduleName) {
    var_dump($app->getModule($moduleName));
    die();
});

var_dump show array(3) - it's a module array definition with className and path elements. Well, the definition module seems to be correct. Unfortunately, I then get an error in [https://github.com/phalcon/cphalcon/blob/v4.0.6/phalcon/Mvc/Application.zep#L189]. A module is an array, but that does not satisfy the condition on line 188. Has anyone encountered a similar problem?


edit: I rewrite class Phalcon/Mvc/Application from zep to php. I rewrite condition in 188-190, to

if (!is_array($module) && !is_object($module)) {
    throw new Exception('Invalid module definition');
}

...and it works now. Maybe it's a extension compilation error?