You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// look if hooks existing
if (is_countable(self::$plugins[$hook] ?? null) && count(self::$plugins[$hook] ?? 0) != 0) {
// go throug all plugins
foreach (self::$plugins[$hook] as $name) {
// check if params are given
if (!is_array($params)) {
// call plugin without params
call_user_func([$name, $hook]);
} else {
// call plugin with params
call_user_func_array([$name, $hook], $params);
}
}
}
I'll be honest though, I'm not sure if it is the best fix, but seemed to work.
I just used a Null Coalesce Operator and did a check if the array is countable.
When I go to the website i just get this message
![image](https://user-images.githubusercontent.com/46356894/120543072-2d9e9d80-c3ec-11eb-968b-cc08213f1f7d.png)
The text was updated successfully, but these errors were encountered: