From 2c09a8b174cfae7c7b62d66fc110f48da45ed0e0 Mon Sep 17 00:00:00 2001 From: MDW Date: Thu, 14 Mar 2024 02:55:48 +0100 Subject: [PATCH 1/3] Fix PhanNoopBinaryOperator by converting to ->element = 'generic' --- htdocs/emailcollector/class/emailcollector.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 8efeda93635..b885ba5340b 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -2385,7 +2385,7 @@ class EmailCollector extends CommonObject $operationslog .= '
We have this data to search thirdparty: id='.$idtouseforthirdparty.', email='.$emailtouseforthirdparty.', name='.$nametouseforthirdparty.', name_alias='.$namealiastouseforthirdparty; $tmpobject = new stdClass(); - $tmpobject->element == 'generic'; + $tmpobject->element = 'generic'; $tmpobject->id = $idtouseforthirdparty; $tmpobject->name = $nametouseforthirdparty; $tmpobject->name_alias = $namealiastouseforthirdparty; From f5ab94634a1f1a0845c81517306639274731bb56 Mon Sep 17 00:00:00 2001 From: MDW Date: Thu, 14 Mar 2024 02:56:56 +0100 Subject: [PATCH 2/3] Fix PhanNoopBinaryOperator by commenting NOOP tests --- htdocs/core/modules/societe/mod_codecompta_digitaria.php | 5 ++--- htdocs/modulebuilder/index.php | 6 +++--- htdocs/paybox/lib/paybox.lib.php | 5 +++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/core/modules/societe/mod_codecompta_digitaria.php b/htdocs/core/modules/societe/mod_codecompta_digitaria.php index a902fc80ac8..d536c5e7dd6 100644 --- a/htdocs/core/modules/societe/mod_codecompta_digitaria.php +++ b/htdocs/core/modules/societe/mod_codecompta_digitaria.php @@ -3,6 +3,7 @@ * Copyright (C) 2010 Laurent Destailleur * Copyright (C) 2019 Alexandre Spangaro * Copyright (C) 2019-2024 Frédéric France + * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -260,9 +261,7 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode $i++; } - } else { - $disponibility == 0; - } + } // else { $disponibility = 0; /* Already set */ } } if ($disponibility == 0) { diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index e0acefa2b0e..6eb2db3db15 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -2398,15 +2398,15 @@ if ($dirins && GETPOST('action') == 'update_right' && GETPOST('modifyright') && if ($label == "Read objects of $module" && $crud != "read") { $crud = "read"; - $label == "Read objects of $module"; + // $label = "Read objects of $module"; } if ($label == "Create/Update objects of $module" && $crud != "write") { $crud = "write"; - $label == "Create/Update objects of $module"; + // $label = "Create/Update objects of $module"; } if ($label == "Delete objects of $module" && $crud != "delete") { $crud = "delete"; - $label == "Delete objects of $module"; + // $label = "Delete objects of $module"; } $permissions = $moduleobj->rights; diff --git a/htdocs/paybox/lib/paybox.lib.php b/htdocs/paybox/lib/paybox.lib.php index 7138646c8ca..6cc94d4d6f3 100644 --- a/htdocs/paybox/lib/paybox.lib.php +++ b/htdocs/paybox/lib/paybox.lib.php @@ -1,6 +1,7 @@ * Copyright (C) 2005-2007 Regis Houssin + * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -146,8 +147,8 @@ function print_paybox_redirect($PRICE, $CURRENCY, $EMAIL, $urlok, $urlko, $TAG) "&PBX_OUTPUT=".$IBS_OUTPUT. "&PBX_SOURCE=".$PBX_SOURCE. "&PBX_TYPEPAIEMENT=".$PBX_TYPEPAIEMENT; - "&PBX_HASH=".$PBX_HASH; - "&PBX_TIME=".$PBX_TIME; + // "&PBX_HASH=".$PBX_HASH; + // "&PBX_TIME=".$PBX_TIME; $binKey = pack("H*", dol_decode($conf->global->PAYBOX_HMAC_KEY)); From 43342c89788c063b8fe6ecd85ef2c527e9c16be5 Mon Sep 17 00:00:00 2001 From: MDW Date: Thu, 14 Mar 2024 02:57:51 +0100 Subject: [PATCH 3/3] Qual: Allow PhanNoopBinaryOperator (all fixed) --- dev/tools/phan/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tools/phan/config.php b/dev/tools/phan/config.php index 4771e953a36..4acc540bacc 100644 --- a/dev/tools/phan/config.php +++ b/dev/tools/phan/config.php @@ -527,7 +527,7 @@ return [ 'PhanTypeMismatchBitwiseBinaryOperands', 'PhanTypeMismatchDimEmpty', 'PhanTypeSuspiciousEcho', - 'PhanNoopBinaryOperator', + // 'PhanNoopBinaryOperator', // 'PhanTypeInvalidBitwiseBinaryOperator', // 'PhanPluginDescriptionlessCommentOnFunction', 'PhanPluginPHPDocInWrongComment',