From 18799c3a7f1bddfbe7a2f3c27994e290a2de4d0e Mon Sep 17 00:00:00 2001
From: BENKE Charlie <charles.fr@benke.fr>
Date: Mon, 29 May 2017 11:00:08 +0200
Subject: [PATCH] Changes Done

question
need to change $actionclassinstance->results in $actionclassinstance->resactionss ???
---
 htdocs/core/class/hookmanager.class.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php
index 89a9b834482..0c78e89fa9e 100644
--- a/htdocs/core/class/hookmanager.class.php
+++ b/htdocs/core/class/hookmanager.class.php
@@ -238,10 +238,10 @@ class HookManager
                     	if (! empty($actionclassinstance->results) && is_array($actionclassinstance->results)) $this->resArray =array_merge($this->resArray, $actionclassinstance->results);
                     	if (! empty($actionclassinstance->resprints)) $this->resPrint.=$actionclassinstance->resprints;
                     	// TODO dead code to remove (do not enable this, but fix hook instead): result must not be a string. we must use $actionclassinstance->resprints to return a string
-                    	if (! is_array($result) && ! is_numeric($result))
+                    	if (! is_array($resaction) && ! is_numeric($resaction))
                     	{
                     		dol_syslog('Error: Bug into hook '.$method.' of module class '.get_class($actionclassinstance).'. Method must not return a string but an int (0=OK, 1=Replace, -1=KO) and set string into ->resprints', LOG_ERR);
-                    		if (empty($actionclassinstance->resprints)) { $this->resPrint.=$result; $result=0; }
+                    		if (empty($actionclassinstance->resprints)) { $this->resPrint.=$resaction; $resaction=0; }
                     	}
                     }
 
-- 
GitLab