Skip to content

Commit

Permalink
FIX executeHooks $object default value (#29647)
Browse files Browse the repository at this point in the history
Change $object parameter default value from '' to null to fix issue when using type declarations in custom hooks.

Mirrored change from commit 0453b3e.
  • Loading branch information
Paul-Schulte authored May 11, 2024
1 parent ba4f732 commit 1406715
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/core/class/hookmanager.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public function initHooks($arraycontext)
* All types can also return some values into an array ->results that will be finaly merged into this->resArray for caller.
* $this->error or this->errors are also defined by class called by this function if error.
*/
public function executeHooks($method, $parameters = array(), &$object = '', &$action = '')
public function executeHooks($method, $parameters = array(), &$object = null, &$action = '')
{
if (!is_array($this->hooks) || empty($this->hooks)) {
return 0; // No hook available, do nothing.
Expand Down

0 comments on commit 1406715

Please sign in to comment.