From f5a156ee06104db03591f1faa68786ca29516809 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 30 Oct 2020 04:17:02 +0100 Subject: [PATCH 1/3] Fix regression --- 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 45dc98f8301..08c290b5c4c 100644 --- a/htdocs/core/class/hookmanager.class.php +++ b/htdocs/core/class/hookmanager.class.php @@ -144,7 +144,7 @@ class HookManager */ public function executeHooks($method, $parameters = array(), &$object = '', &$action = '') { - if (! is_array($this->hooks) || empty($this->hooks)) return 0; + if (! is_array($this->hooks) || empty($this->hooks)) return ''; $parameters['context']=join(':', $this->contextarray); //dol_syslog(get_class($this).'::executeHooks method='.$method." action=".$action." context=".$parameters['context']); From f51b02026c142f6246a970aa9e4f4eae598c3285 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 30 Oct 2020 04:24:06 +0100 Subject: [PATCH 2/3] Fix regression --- htdocs/core/lib/security2.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php index aa53a5b71d7..85a297a4bc4 100644 --- a/htdocs/core/lib/security2.lib.php +++ b/htdocs/core/lib/security2.lib.php @@ -527,7 +527,7 @@ function getRandomPassword($generic = false, $replaceambiguouschars = null, $len } else { - $tmp = random_int(0, $max); + $tmp = mt_rand(0, $max); $generated_password=str_replace($replaceambiguouschars, $numbers[$tmp], $generated_password); } } From 5504e3b2366df7067ebb766a5c509a6e1f4b3660 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 30 Oct 2020 05:58:40 +0100 Subject: [PATCH 3/3] Fix phpcs --- htdocs/core/tpl/advtarget.tpl.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/core/tpl/advtarget.tpl.php b/htdocs/core/tpl/advtarget.tpl.php index f2378ce5e4f..21bc9928af2 100644 --- a/htdocs/core/tpl/advtarget.tpl.php +++ b/htdocs/core/tpl/advtarget.tpl.php @@ -482,7 +482,6 @@ if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) { print '' . $extrafields->attributes[$elementtype]['label'][$key]; if ($array_query['options_' . $key . '_cnct'] != '' || (is_array($array_query['options_' . $key . '_cnct']) && count($array_query['options_' . $key . '_cnct']) > 0)) { print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing'); - } print ''; if (($extrafields->attributes[$elementtype]['type'][$key] == 'varchar') || ($extrafields->attributes[$elementtype]['type'][$key] == 'text')) {