arguments fix

This commit is contained in:
Amberstone 2024-10-01 01:40:29 +09:00
parent 34b9db5156
commit a8dafec3de
Signed by: amber
GPG key ID: 094B0E55F98D8BF1
3 changed files with 5 additions and 3 deletions

View file

@ -13,6 +13,6 @@ class Event
public function getAction(...$data) public function getAction(...$data)
{ {
return call_user_func($this->action, $data); return call_user_func_array($this->action, $data);
} }
} }

View file

@ -211,7 +211,7 @@ class EventHandler
/** /**
* Adding Custom Functions at the declared time * Adding Custom Functions at the declared time
* @param string $event : event list 참조 * @param string $event : event list 참조
* @param Event $callback * @param callback $callback
* @param int $priority : optional * @param int $priority : optional
* @return void * @return void
*/ */
@ -227,7 +227,7 @@ class EventHandler
{ {
if (isset(self::$eventHandlers[$event])) { if (isset(self::$eventHandlers[$event])) {
foreach (self::$eventHandlers[$event] as $callback) { foreach (self::$eventHandlers[$event] as $callback) {
$callback->getAction($data); $callback->getAction(...$data);
} }
if (function_exists("run_event")) { if (function_exists("run_event")) {

View file

@ -393,6 +393,8 @@ if (file_exists($dbconfig_file)) {
sql_query("SET SESSION sql_mode = ''"); sql_query("SET SESSION sql_mode = ''");
if (defined('G5_TIMEZONE')) if (defined('G5_TIMEZONE'))
sql_query(" set time_zone = '" . G5_TIMEZONE . "'"); sql_query(" set time_zone = '" . G5_TIMEZONE . "'");
EventHandler::triggerEvent("amber.load_config_after");
} else { } else {
?><!doctype html> ?><!doctype html>
<html lang="ko"> <html lang="ko">