Bug. php 8. nl2br with null parameter in view_sales_order. Fixed.
authorJoe <joe.hunt.consulting@gmail.com>
Tue, 7 Feb 2023 22:37:55 +0000 (23:37 +0100)
committerJoe <joe.hunt.consulting@gmail.com>
Tue, 7 Feb 2023 22:37:55 +0000 (23:37 +0100)
sales/view/view_sales_order.php

index 61a2181b8089e145f456b2452790d02d39b326c3..9d7eb795f3a76b557fd45af329fe56734ec42b60 100644 (file)
@@ -97,7 +97,7 @@ label_row(_("Reference"), $_SESSION['View']->reference, "class='tableheader2'",
 label_row(_("Telephone"), $_SESSION['View']->phone, "class='tableheader2'", "colspan=3");
 label_row(_("E-mail"), "<a href='mailto:" . $_SESSION['View']->email . "'>" . $_SESSION['View']->email . "</a>",
        "class='tableheader2'", "colspan=3");
-label_row(_("Comments"), nl2br($_SESSION['View']->Comments), "class='tableheader2'", "colspan=3");
+label_row(_("Comments"), !empty($_SESSION['View']->Comments) ? nl2br($_SESSION['View']->Comments) : "", "class='tableheader2'", "colspan=3");
 end_table();
 
 if ($_GET['trans_type'] != ST_SALESQUOTE)