Skip to content

Commit

Permalink
Fix call_user_func_array() arguments on PHP 8 (#30608)
Browse files Browse the repository at this point in the history
  • Loading branch information
SharkyKZ authored Nov 14, 2020
1 parent cfdb61a commit 2d86280
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libraries/joomla/event/dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function trigger($event, $args = array())
// Fire the event for a function based observer.
elseif (is_array($this->_observers[$key]))
{
$value = call_user_func_array($this->_observers[$key]['handler'], $args);
$value = call_user_func_array($this->_observers[$key]['handler'], array_values($args));
}

if (isset($value))
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/event/event.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function update(&$args)
*/
if (method_exists($this, $event))
{
return call_user_func_array(array($this, $event), $args);
return call_user_func_array(array($this, $event), array_values($args));
}
}
}

0 comments on commit 2d86280

Please sign in to comment.