Fix for php8

This commit is contained in:
Laurent Destailleur
2020-12-23 23:06:34 +01:00
parent f8e4985de1
commit 02daf09928
3 changed files with 6 additions and 2 deletions

View File

@@ -52,9 +52,11 @@ class Conf
public $disable_compute; public $disable_compute;
//! Used to store current currency (ISO code like 'USD', 'EUR', ...) //! Used to store current currency (ISO code like 'USD', 'EUR', ...)
public $currency; public $currency;
//! Used to store current css (from theme) //! Used to store current css (from theme)
public $theme; // Contains current theme ("eldy", "auguria", ...) public $theme; // Contains current theme ("eldy", "auguria", ...)
public $css; // Contains full path of css page ("/theme/eldy/style.css.php", ...) public $css; // Contains full path of css page ("/theme/eldy/style.css.php", ...)
//! Used to store current menu handler //! Used to store current menu handler
public $standard_menu; public $standard_menu;
// List of activated modules // List of activated modules
@@ -98,6 +100,8 @@ class Conf
public $dol_no_mouse_hover; // Set if we force param dol_no_mouse_hover into login url or if browser is smartphone public $dol_no_mouse_hover; // Set if we force param dol_no_mouse_hover into login url or if browser is smartphone
public $dol_use_jmobile; // Set if we force param dol_use_jmobile into login url public $dol_use_jmobile; // Set if we force param dol_use_jmobile into login url
public $liste_limit;
/** /**
* Constructor * Constructor

View File

@@ -4877,7 +4877,7 @@ function price2num($amount, $rounding = '', $option = 0)
elseif ($rounding == 'CR') $nbofdectoround = 8; elseif ($rounding == 'CR') $nbofdectoround = 8;
elseif (is_numeric($rounding)) $nbofdectoround = $rounding; elseif (is_numeric($rounding)) $nbofdectoround = $rounding;
//print "RR".$amount.' - '.$nbofdectoround.'<br>'; //print "RR".$amount.' - '.$nbofdectoround.'<br>';
if (dol_strlen($nbofdectoround)) $amount = round($amount, $nbofdectoround); // $nbofdectoround can be 0. if (dol_strlen($nbofdectoround)) $amount = round(is_string($amount) ? (float) $amount : $amount, $nbofdectoround); // $nbofdectoround can be 0.
else return 'ErrorBadParameterProvidedToFunction'; else return 'ErrorBadParameterProvidedToFunction';
//print 'SS'.$amount.' - '.$nbofdec.' - '.$dec.' - '.$thousand.' - '.$nbofdectoround.'<br>'; //print 'SS'.$amount.' - '.$nbofdec.' - '.$dec.' - '.$thousand.' - '.$nbofdectoround.'<br>';

View File

@@ -2802,7 +2802,7 @@ if (!function_exists("llxFooter"))
if (!empty($contextpage)) $_SESSION['lastsearch_contextpage_tmp_'.$relativepathstring] = $contextpage; if (!empty($contextpage)) $_SESSION['lastsearch_contextpage_tmp_'.$relativepathstring] = $contextpage;
if (!empty($page) && $page > 0) $_SESSION['lastsearch_page_tmp_'.$relativepathstring] = $page; if (!empty($page) && $page > 0) $_SESSION['lastsearch_page_tmp_'.$relativepathstring] = $page;
if (!empty($limit) && $limit != $conf->limit) $_SESSION['lastsearch_limit_tmp_'.$relativepathstring] = $limit; if (!empty($limit) && $limit != $conf->liste_limit) $_SESSION['lastsearch_limit_tmp_'.$relativepathstring] = $limit;
unset($_SESSION['lastsearch_contextpage_'.$relativepathstring]); unset($_SESSION['lastsearch_contextpage_'.$relativepathstring]);
unset($_SESSION['lastsearch_page_'.$relativepathstring]); unset($_SESSION['lastsearch_page_'.$relativepathstring]);