*
* @var array $authorizedPlugins
*/
- private $authorizedPlugins;
+ private $authorizedPlugins = [];
/**
* List of loaded plugins.
$data['_LOGGEDIN_'] = $params['loggedin'];
}
+ if (isset($params['basePath'])) {
+ $data['_BASE_PATH_'] = $params['basePath'];
+ }
+
+ if (isset($params['bookmarkService'])) {
+ $data['_BOOKMARK_SERVICE_'] = $params['bookmarkService'];
+ }
+
foreach ($this->loadedPlugins as $plugin) {
$hookFunction = $this->buildHookName($hook, $plugin);
if (function_exists($hookFunction)) {
- $data = call_user_func($hookFunction, $data, $this->conf);
+ try {
+ $data = call_user_func($hookFunction, $data, $this->conf);
+ } catch (\Throwable $e) {
+ $error = $plugin . t(' [plugin incompatibility]: ') . $e->getMessage();
+ $this->errors = array_unique(array_merge($this->errors, [$error]));
+ }
}
}
}