From b52c79dcfec372a4a873a3da909795fa0b223120 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 4 Aug 2023 04:37:10 +0200 Subject: [PATCH] Fix warnings --- htdocs/contact/class/contact.class.php | 2 - htdocs/core/lib/website.lib.php | 2 +- htdocs/core/modules/DolibarrModules.class.php | 42 ++++++++++--------- htdocs/societe/class/societeaccount.class.php | 2 + 4 files changed, 25 insertions(+), 23 deletions(-) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 4fbdf3f096b..24ee091238d 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -2194,8 +2194,6 @@ class Contact extends CommonObject */ public function getKanbanView($option = '', $arraydata = null) { - global $langs; - $selected = (empty($arraydata['selected']) ? 0 : $arraydata['selected']); $return = '
'; diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php index e6e8dd819c0..d27c4dac376 100644 --- a/htdocs/core/lib/website.lib.php +++ b/htdocs/core/lib/website.lib.php @@ -760,7 +760,7 @@ function getStructuredData($type, $data = array()) $ret .= "\n".'}'."\n"; $ret .= ''."\n"; } else { - $ret .= ''."\n"; + $ret = ''."\n"; } } elseif ($type == 'product') { $ret = ''."\n"; diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 83676b29f43..466469423d8 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -2430,7 +2430,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $versiontrans .= 'warning'; } - print ' + $return = '
picto, 'class="inline-block valignmiddle"', 1); } else { - print img_object($alttext, $this->picto, 'class="inline-block valignmiddle"'); + $return .= img_object($alttext, $this->picto, 'class="inline-block valignmiddle"'); } } else { - print img_object($alttext, 'generic', 'class="inline-block valignmiddle"'); + $return .= img_object($alttext, 'generic', 'class="inline-block valignmiddle"'); } if ($this->isCoreOrExternalModule() == 'external' || preg_match('/development|experimental|deprecated/i', $version)) { @@ -2458,34 +2458,36 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $versionTitle.= '
'.$langs->trans('ModuleUpdateAvailable').' : '.$this->lastVersion; } - print ''; - print $this->getVersion(1); - print ''; + $return .= ''; + $return .= $this->getVersion(1); + $return .= ''; } - print '
+ $return .= '
'.$this->getName().' '.nl2br($this->getDesc()).''; - print '
'; - print '
'; - print '
'; - print $codetoconfig; - print '
'; - print '
'; - print $codeenabledisable; - print '
'; - print '
'; + $return .= '
'; + $return .= '
'; + $return .= $codetoconfig; + $return .= '
'; + $return .= '
'; + $return .= $codeenabledisable; + $return .= '
'; + $return .= '
'; - print ' + $return .= '
'; + + return $return; } /** diff --git a/htdocs/societe/class/societeaccount.class.php b/htdocs/societe/class/societeaccount.class.php index 82ff5c41c11..4d4fdc012d8 100644 --- a/htdocs/societe/class/societeaccount.class.php +++ b/htdocs/societe/class/societeaccount.class.php @@ -534,6 +534,8 @@ class SocieteAccount extends CommonObject return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'), 'statut5'); } } + + return ''; } /**