-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Qual: Fix phan notices not seen locally
- Loading branch information
Showing
6 changed files
with
19 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<?php | ||
/* Copyright (C) 2017-2020 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2019-2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2025 MDW <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -135,7 +136,7 @@ | |
$formfile = new FormFile($db); | ||
|
||
$title = $langs->trans('BOM'); | ||
$help_url ='EN:Module_BOM'; | ||
$help_url = 'EN:Module_BOM'; | ||
|
||
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-bom page-net_needs'); | ||
|
||
|
@@ -330,7 +331,7 @@ | |
if ($useunit) { | ||
require_once DOL_DOCUMENT_ROOT.'/core/class/cunits.class.php'; | ||
$unit = new CUnits($db); | ||
$unit->fetch($elem['fk_unit']); | ||
$unit->fetch((int) $elem['fk_unit']); | ||
print(isset($unit->label) ? " ".$langs->trans(ucwords($unit->label))." " : ''); | ||
} | ||
print '</td>'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* Copyright (C) 2012-2014 Raphaël Doursenaud <[email protected]> | ||
* Copyright (C) 2023 Nick Fragoulis | ||
* Copyright (C) 2024-2025 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* Copyright (C) 2024-2025 MDW <[email protected]> | ||
* Copyright (C) 2024 Alexandre Spangaro <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
|
@@ -2005,7 +2005,7 @@ public function buildSwitzerlandQRString() | |
$s .= ($this->multicurrency_code ? $this->multicurrency_code : $conf->currency)."\n"; | ||
// Buyer | ||
$s .= "S\n"; | ||
$s .= dol_trunc($this->thirdparty->name, 70, 'right', 'UTF-8', 1)."\n"; | ||
$s .= dol_trunc((string) $this->thirdparty->name, 70, 'right', 'UTF-8', 1)."\n"; | ||
$addresslinearray = explode("\n", $this->thirdparty->address); | ||
$s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1)."\n"; // address line 1 | ||
$s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1)."\n"; // address line 2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
* Copyright (C) 2012 Yann Droneaud <[email protected]> | ||
* Copyright (C) 2012 Florian Henry <[email protected]> | ||
* Copyright (C) 2015 Marcos García <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* Copyright (C) 2024-2025 MDW <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
|
@@ -53,11 +53,11 @@ class DoliDBPgsql extends DoliDB | |
const VERSIONMIN = '9.0.0'; // Version min database | ||
|
||
/** | ||
* @var boolean $unescapeslashquot Set this to 1 when calling SQL queries, to say that SQL is not standard but already escaped for Mysql. Used by PostgreSQL driver | ||
* @var boolean Set this to 1 when calling SQL queries, to say that SQL is not standard but already escaped for Mysql. Used by PostgreSQL driver | ||
*/ | ||
public $unescapeslashquot = false; | ||
/** | ||
* @var boolean $standard_conforming_strings Set this to true if postgres accept only standard encoding of string using '' and not \' | ||
* @var boolean Set this to true if postgres accept only standard encoding of string using '' and not \' | ||
*/ | ||
public $standard_conforming_strings = false; | ||
|
||
|
@@ -951,7 +951,7 @@ public function DDLCreateDb($database, $charset = '', $collation = '', $owner = | |
//print $charset.' '.setlocale(LC_CTYPE,'0'); exit; | ||
|
||
// NOTE: Do not use ' around the database name | ||
$sql = "CREATE DATABASE ".$this->escape($database)." OWNER '".$this->escape($owner)."' ENCODING '".$this->escape($charset)."'"; | ||
$sql = "CREATE DATABASE ".$this->escape($database)." OWNER '".$this->escape($owner)."' ENCODING '".$this->escape((string) $charset)."'"; | ||
|
||
dol_syslog($sql, LOG_DEBUG); | ||
$ret = $this->query($sql); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
* Copyright (C) 2012 Charles-Fr BENKE <[email protected]> | ||
* Copyright (C) 2015 Juanjo Menent <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* Copyright (C) 2024-2025 MDW <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -631,7 +631,7 @@ | |
$entityicon = $tmparray[0]; | ||
$entitylang = $tmparray[1]; | ||
} | ||
print img_object('', $entityicon).' '.$langs->trans($entitylang); | ||
print img_object('', $entityicon).' '.$langs->trans((string) $entitylang); | ||
print '</td>'; | ||
|
||
$text = (empty($objexport->array_export_special[0][$code]) ? '' : '<i>'); | ||
|
@@ -641,7 +641,7 @@ | |
} else { | ||
$text .= $langs->trans($label); | ||
} | ||
$text .=(empty($objexport->array_export_special[0][$code]) ? '' : '</i>'); | ||
$text .= (empty($objexport->array_export_special[0][$code]) ? '' : '</i>'); | ||
|
||
$tablename = getablenamefromfield($code, $sqlmaxforexport); | ||
$htmltext = '<b>'.$langs->trans("Name").":</b> ".$text.'<br>'; | ||
|
@@ -823,7 +823,7 @@ | |
$entityicon = $tmparray[0]; | ||
$entitylang = $tmparray[1]; | ||
} | ||
print img_object('', $entityicon).' '.$langs->trans($entitylang); | ||
print img_object('', $entityicon).' '.$langs->trans((string) $entitylang); | ||
print '</td>'; | ||
|
||
// Field name | ||
|
@@ -837,7 +837,7 @@ | |
} else { | ||
$text .= $langs->trans($label); | ||
} | ||
$text .=(empty($objexport->array_export_special[0][$code]) ? '' : '</i>'); | ||
$text .= (empty($objexport->array_export_special[0][$code]) ? '' : '</i>'); | ||
|
||
$tablename = getablenamefromfield($code, $sqlmaxforexport); | ||
$htmltext = '<b>'.$langs->trans("Name").':</b> '.$text.'<br>'; | ||
|
@@ -1046,7 +1046,7 @@ | |
} else { | ||
$text .= $langs->trans($labelName); | ||
} | ||
$text .=(empty($objexport->array_export_special[0][$code]) ? '' : '</i>'); | ||
$text .= (empty($objexport->array_export_special[0][$code]) ? '' : '</i>'); | ||
|
||
$tablename = getablenamefromfield($code, $sqlmaxforexport); | ||
$htmltext = '<b>'.$langs->trans("Name").':</b> '.$text.'<br>'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
* Copyright (C) 2015 Raphaël Doursenaud <[email protected]> | ||
* Copyright (C) 2020 Nicolas ZABOURI <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* Copyright (C) 2024-2025 MDW <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -163,7 +163,7 @@ class WebsitePage extends CommonObject | |
public $fk_object; | ||
|
||
/** | ||
* @var int Another ID that is the $id but with an offset so that ID of pages of the website start at 1 | ||
* @var int Another ID that is the but with an offset so that ID of pages of the website start at 1 | ||
*/ | ||
public $newid; | ||
|
||
|
@@ -661,7 +661,7 @@ public function update(User $user, $notrigger = 0) | |
return -1; | ||
} | ||
$tmppage = new WebsitePage($this->db); | ||
$tmppage->fetch($this->fk_page); | ||
$tmppage->fetch((int) $this->fk_page); | ||
if ($tmppage->lang == $this->lang) { | ||
$this->error = "ErrorLanguageOfTranslatedPageIsSameThanThisPage"; | ||
return -1; | ||
|