Recoverable error: Argument 1 passed to Netzmacht\Bootstrap\Core\Event\InitializeEnvironmentEvent::__construct()
Closed this issue · 1 comments
t-me commented
Hello,
I have added my own exstension with this hook :
$GLOBALS['TL_HOOKS'] = array
(
'addCustomRegexp' => array
(
array('bsn_class', 'myBSNcheck')
)
);
on my localhost (without composer reposorie and without bootstrap) it works fine no problem,
But wen i upload it to my system/modules/ directory i get this error :
Recoverable error: Argument 1 passed to Netzmacht\Bootstrap\Core\Event\InitializeEnvironmentEvent::__construct() must be an instance of Netzmacht\Bootstrap\Core\Environment, null given, called in /composer/vendor/contao-bootstrap/core/src/Contao/Hooks.php on line 87 and defined in composer/vendor/contao-bootstrap/core/src/Event/InitializeEnvironmentEvent.php on line 36
#0 composer/vendor/contao-bootstrap/core/src/Event/InitializeEnvironmentEvent.php(36): __error(4096, 'Argument 1 pass...', '/www/ftpstorage...', 36, Array)
#1 composer/vendor/contao-bootstrap/core/src/Contao/Hooks.php(87): Netzmacht\Bootstrap\Core\Event\InitializeEnvironmentEvent->__construct(NULL)
#2 composer/vendor/contao-bootstrap/core/src/Contao/Hooks.php(76): Netzmacht\Bootstrap\Core\Contao\Hooks->initializeEnvironment()
#3 system/initialize.php(243): Netzmacht\Bootstrap\Core\Contao\Hooks->initializeSystem()
#4 contao/main.php(16): require('/www/ftpstorage...')
#5 {main}
Fatal error: Call to a member function dispatch() on a non-object in /composer/vendor/contao-bootstrap/core/src/Contao/Hooks.php on line 88
What am i doing wrong.
dmolineus commented
You are killing all other hooks which breaks the dependency container initialization.