From 98f944cfcdd5d3da41b048ebe629d61d90394cdc Mon Sep 17 00:00:00 2001 From: sparkyx Date: Sun, 16 Jul 2023 18:00:40 +0200 Subject: [PATCH] PHP8.1 compatibility --- include/class/document.class.php | 1 + include/lib/ac_common.php | 6 +++--- include/template/ledger_detail_bottom.php | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/class/document.class.php b/include/class/document.class.php index 6019fff10..d32af6d63 100644 --- a/include/class/document.class.php +++ b/include/class/document.class.php @@ -1822,6 +1822,7 @@ class Document } if ($count==0) { + $p_value=''; if ($p_type=='OOo') { $p_value=noalyss_str_replace('&', '&', $p_value); diff --git a/include/lib/ac_common.php b/include/lib/ac_common.php index 49a312fd3..cf3d0300e 100644 --- a/include/lib/ac_common.php +++ b/include/lib/ac_common.php @@ -413,7 +413,7 @@ function html_min_page_start($p_theme="", $p_script="", $p_script2="") $Res = $cn->exec_sql("select the_filestyle from theme where the_name='" . $p_theme . "'"); if (Database::num_row($Res) == 0) - $style = "style-classic.css"; + $style = "style-classic7.css"; else { $s = Database::fetch_array($Res, 0); @@ -422,7 +422,7 @@ function html_min_page_start($p_theme="", $p_script="", $p_script2="") } else { - $style = "style-classic.css"; + $style = "style-classic7.css"; } // end if echo ''; echo ""; @@ -509,7 +509,7 @@ function FormatString($p_string) function sql_string($p_string) { - $p_string = trim($p_string); + $p_string = trim($p_string??""); if (strlen($p_string) == 0) return null; $p_string = str_replace("'", "''", $p_string); diff --git a/include/template/ledger_detail_bottom.php b/include/template/ledger_detail_bottom.php index 78bce0fb4..c333c853b 100644 --- a/include/template/ledger_detail_bottom.php +++ b/include/template/ledger_detail_bottom.php @@ -230,7 +230,7 @@ if ($aRap != null ) { else $remove=''; - $comment=strip_tags($array_jr[0]['jr_comment']); + $comment=strip_tags($array_jr[0]['jr_comment']??""); $pj_nb=h($array_jr[0]['jr_pj_number']); echo tr (td(format_date($array_jr[0]['jr_date'])). td(''.$internal.'').