Fix warning

This commit is contained in:
Laurent Destailleur
2022-12-22 12:27:32 +01:00
parent e1093b541e
commit d7d07cb204
2 changed files with 2 additions and 2 deletions

View File

@@ -367,7 +367,7 @@ if ($modecompta == 'BOOKKEEPING') {
$cpts = $AccCat->getCptsCat(0, $tmppredefinedgroupwhere); $cpts = $AccCat->getCptsCat(0, $tmppredefinedgroupwhere);
foreach ($cpts as $j => $cpt) { foreach ($cpts as $j => $cpt) {
$return = $AccCat->getSumDebitCredit($cpt['account_number'], $date_start, $date_end, $cpt['dc']); $return = $AccCat->getSumDebitCredit($cpt['account_number'], $date_start, $date_end, (empty($cpt['dc']) ? 0 : $cpt['dc']));
if ($return < 0) { if ($return < 0) {
setEventMessages(null, $AccCat->errors, 'errors'); setEventMessages(null, $AccCat->errors, 'errors');
$resultN = 0; $resultN = 0;

View File

@@ -998,7 +998,7 @@ if (!defined('NOLOGIN')) {
$hookmanager->initHooks(array('main')); $hookmanager->initHooks(array('main'));
// Code for search criteria persistence. // Code for search criteria persistence.
if (!empty($_GET['save_lastsearch_values'])) { // We must use $_GET here if (!empty($_GET['save_lastsearch_values']) && !empty($_SERVER["HTTP_REFERER"])) { // We must use $_GET here
$relativepathstring = preg_replace('/\?.*$/', '', $_SERVER["HTTP_REFERER"]); $relativepathstring = preg_replace('/\?.*$/', '', $_SERVER["HTTP_REFERER"]);
$relativepathstring = preg_replace('/^https?:\/\/[^\/]*/', '', $relativepathstring); // Get full path except host server $relativepathstring = preg_replace('/^https?:\/\/[^\/]*/', '', $relativepathstring); // Get full path except host server
// Clean $relativepathstring // Clean $relativepathstring