diff --git a/htdocs/core/boxes/box_graph_propales_permonth.php b/htdocs/core/boxes/box_graph_propales_permonth.php index 9feac62f6da..b442d136306 100644 --- a/htdocs/core/boxes/box_graph_propales_permonth.php +++ b/htdocs/core/boxes/box_graph_propales_permonth.php @@ -184,14 +184,7 @@ class box_graph_propales_permonth extends ModeleBoxes //$datatype2 = array('lines','bars'); $filenamenb = $dir."/".$prefix."propalsamountinyear-".$endyear.".png"; - if (!empty($mode)) { - if ($mode == 'customer') { - $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=propalsamountinyear-'.$endyear.'.png'; - } - if ($mode == 'supplier') { - $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstatssupplier&file=propalsamountinyear-'.$endyear.'.png'; - } - } + $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=propalsamountinyear-'.$endyear.'.png'; $px2 = new DolGraph(); $mesg = $px2->isGraphKo(); diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 1bcc398cd40..94c21e89e1b 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -560,7 +560,7 @@ if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && getDolGlobalInt( // Check a token is provided for all cases that need a mandatory token // (all POST actions + all sensitive GET actions + all mass actions + all login/actions/logout on pages with CSRFCHECK_WITH_TOKEN set) if ( - $_SERVER['REQUEST_METHOD'] == 'POST' || + (!empty($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'POST') || $sensitiveget || GETPOSTISSET('massaction') || ((GETPOSTISSET('actionlogin') || GETPOSTISSET('action')) && defined('CSRFCHECK_WITH_TOKEN')) diff --git a/phpstan.neon b/phpstan.neon index 5761cee2b1c..77174100ca6 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -49,6 +49,7 @@ parameters: - '#Undefined variable: \$error#' - '#Undefined variable: \$errors#' - '#Undefined variable: \$form#' + - '#has an unused parameter \$param#' - '#Result of function fieldList#' - '#Caught class Stripe#' - '#Function llxHeader invoked with#'