Skip to content

Commit

Permalink
fix CI (#31692)
Browse files Browse the repository at this point in the history
* Update commonobjectline.class.php

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
  • Loading branch information
frederic34 and eldy authored Nov 5, 2024
1 parent 08714ea commit 24e7285
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion htdocs/compta/resultat/clientfourn.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2012-2014 Raphaël Dourseanud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2014-2106 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
Expand Down
8 changes: 4 additions & 4 deletions htdocs/core/class/commonobjectline.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,12 +354,12 @@ public function getNomUrl($withpicto = 0)
$parent_element_properties = getElementProperties($this->parent_element);
$parent_classname = $parent_element_properties['classname'];
$parent_element = new $parent_classname($this->db);
/** @var CommonObject $parent_element */
$parentattribute = $this->fk_parent_attribute;
if ($parentattribute && method_exists($parent_element, 'fetch')) {
// @phan-suppress-next-line PhanPluginUnknownObjectMethodCall
$parent_element->fetch($this->$parentattribute); /* @phpstan-ignore-line */
$parent_element->fetch($this->$parentattribute); // @phan-suppress-current-line PhanPluginUnknownObjectMethodCall
}

// @phan-suppress-next-line PhanPluginUnknownObjectMethodCall
return $parent_element->getNomUrl($withpicto).' - Line #'.$this->id; /* @phpstan-ignore-line */
return $parent_element->getNomUrl($withpicto).' - Line #'.$this->id; // @phan-suppress-current-line PhanPluginUnknownObjectMethodCall
}
}
2 changes: 1 addition & 1 deletion htdocs/core/class/discount.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ public function getSumFromThisCreditNotesNotUsed($invoice, $multicurrency = 0)
* @param string $option Where to link to ('invoice' or 'discount')
* @return string String with URL
*/
public function getNomUrl($withpicto, $option = 'invoice')
public function getNomUrl($withpicto = 0, $option = 'invoice')
{
global $langs;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/cron/class/cronjob.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ public function getTooltipContentArray($params)
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
* @return string String with URL
*/
public function getNomUrl(int $withpicto = 0, string $option = '', int $notooltip = 0, string $morecss = '', int $save_lastsearch_value = -1)
public function getNomUrl($withpicto = 0, string $option = '', int $notooltip = 0, string $morecss = '', int $save_lastsearch_value = -1)
{
global $conf, $langs;

Expand Down
2 changes: 1 addition & 1 deletion htdocs/resource/class/dolresource.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ public function getTooltipContentArray($params)
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
* @return string String with URL
*/
public function getNomUrl(int $withpicto = 0, string $option = '', string $get_params = '', int $notooltip = 0, string $morecss = '', int $save_lastsearch_value = -1)
public function getNomUrl($withpicto = 0, string $option = '', string $get_params = '', int $notooltip = 0, string $morecss = '', int $save_lastsearch_value = -1)
{
global $langs, $hookmanager, $action;

Expand Down

0 comments on commit 24e7285

Please sign in to comment.