noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 10/34: PHP8.1 compatibility


From: dwm
Subject: [Noalyss-commit] [noalyss] 10/34: PHP8.1 compatibility
Date: Wed, 17 Jan 2024 12:54:06 -0500 (EST)

sparkyx pushed a commit to branch devel
in repository noalyss.

commit 4db377ebbac321343bb8f52e706c3ff07ccaaf20
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sun Jan 7 17:14:24 2024 +0100

    PHP8.1 compatibility
---
 include/class/acc_ledger_fin.class.php | 2 +-
 include/template/dashboard.php         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/class/acc_ledger_fin.class.php 
b/include/class/acc_ledger_fin.class.php
index 166037523..de3a2ea72 100644
--- a/include/class/acc_ledger_fin.class.php
+++ b/include/class/acc_ledger_fin.class.php
@@ -654,7 +654,7 @@ class Acc_Ledger_Fin extends Acc_Ledger
                     td(_("Ancien solde")).
                     td(nbm($solde).$cur, 'class="num"')
             );
-            $new_solde=bcadd($solde, $tot_amount);
+            $new_solde=bcadd($solde??0, $tot_amount??0);
             $r.=tr(
                     td(_("Nouveau solde")).
                     td(nbm($new_solde).$cur, ' class="num"')
diff --git a/include/template/dashboard.php b/include/template/dashboard.php
index 5b1b7c0e7..cd32f25cd 100644
--- a/include/template/dashboard.php
+++ b/include/template/dashboard.php
@@ -122,7 +122,7 @@ for($i=0;$i<count($last_ledger);$i++):
             
         </td>
 <td class="box">
-   <?php echo h(mb_substr($last_ledger[$i]['jr_comment'],0,40,'UTF-8'))?>
+   <?php echo h(mb_substr($last_ledger[$i]['jr_comment']??"",0,40,'UTF-8'))?>
 </td>
 <td class="box">
 <?php echo HtmlInput::detail_op($last_ledger[$i]['jr_id'], 
$last_ledger[$i]['jr_internal'])?>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]