From 1406715ce59ea2fc10fb45f828db3f8257fdce21 Mon Sep 17 00:00:00 2001 From: Paul Schulte <17964316+Paul-Schulte@users.noreply.github.com> Date: Sat, 11 May 2024 14:48:52 -0400 Subject: [PATCH] FIX executeHooks $object default value (#29647) Change $object parameter default value from '' to null to fix issue when using type declarations in custom hooks. Mirrored change from commit 0453b3e. --- htdocs/core/class/hookmanager.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php index 6c43f5ce7970b..cb89f123a9f57 100644 --- a/htdocs/core/class/hookmanager.class.php +++ b/htdocs/core/class/hookmanager.class.php @@ -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.