From 8abde17e954f17ff94d84a32865cfa566c407aac Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 30 Dec 2022 12:15:18 +0100 Subject: [PATCH] Fix warning --- htdocs/core/modules/DolibarrModules.class.php | 4 ++-- htdocs/product/card.php | 4 ++-- qodana.yaml | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 7297b17a6b7..afc19a12e92 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -299,10 +299,10 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it public $picto; /** - * @var string[] List of config pages + * @var string[]|string List of config pages (Old modules uses a string. New one must use an array) * * Name of php pages stored into module/admin directory, used to setup module. - * e.g.: "admin.php@module" + * e.g.: array("setup.php@mymodule") */ public $config_page_url; diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 5574984b5fd..031dccadc53 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -541,7 +541,7 @@ if (empty($reshook)) { if ($result < 0) { $error++; $mesg = 'Failed to get bar code type information '; - setEventMessages($mesg.$stdobject->error, $mesg.$stdobject->errors, 'errors'); + setEventMessages($mesg.$stdobject->error, $stdobject->errors, 'errors'); } $object->barcode_type_code = $stdobject->barcode_type_code; $object->barcode_type_coder = $stdobject->barcode_type_coder; @@ -780,7 +780,7 @@ if (empty($reshook)) { if ($result < 0) { $error++; $mesg = 'Failed to get bar code type information '; - setEventMessages($mesg.$stdobject->error, $mesg.$stdobject->errors, 'errors'); + setEventMessages($mesg.$stdobject->error, $stdobject->errors, 'errors'); } $object->barcode_type_code = $stdobject->barcode_type_code; $object->barcode_type_coder = $stdobject->barcode_type_coder; diff --git a/qodana.yaml b/qodana.yaml index 08dc6c18395..b1a76747a5b 100644 --- a/qodana.yaml +++ b/qodana.yaml @@ -61,4 +61,5 @@ exclude: - name: PhpClassConstantAccessedViaChildClassInspection - name: RegExpUnnecessaryNonCapturingGroup - name: PhpPregMatchReplaceWithComparisonInspection - - name: PhpArrayWriteIsNotUsedInspection \ No newline at end of file + - name: PhpArrayWriteIsNotUsedInspection + - name: PhpUndefinedNamespaceInspection \ No newline at end of file