From 129c53342afaf2e6d8b6ecbb2f8867673d03862f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 7 Nov 2020 20:01:28 +0100 Subject: [PATCH] Fix warning --- htdocs/compta/index.php | 2 +- htdocs/core/lib/functions2.lib.php | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 816a111e51d..5614659eac0 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -1049,7 +1049,7 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''.price($obj->total_ht).''; print ''.price($obj->total_ttc).''; print ''.price($obj->am).''; - print ''.$tmpinvoice->getLibStatut(3, $obj->am, $obj->type).''; + print ''.$tmpinvoice->getLibStatut(3, $obj->am).''; print ''; $total_ttc += $obj->total_ttc; diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 9d8673578dd..7d00fee0773 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -944,9 +944,8 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $ //print "masktri=".$masktri." maskcounter=".$maskcounter." maskraz=".$maskraz." maskoffset=".$maskoffset."
\n"; // Define $sqlstring - if (function_exists('mb_strrpos')) - { - $posnumstart = mb_strrpos($maskwithnocode, $maskcounter, 'UTF-8'); + if (function_exists('mb_strrpos')) { + $posnumstart = mb_strrpos($maskwithnocode, $maskcounter, 0, 'UTF-8'); } else { $posnumstart = strrpos($maskwithnocode, $maskcounter); } // Pos of counter in final string (from 0 to ...)