Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PHP 8.0 The pain that must be endured.
05-25-2023, 11:51 PM,
#1
PHP 8.0 The pain that must be endured.
Hi every,

Due to work requirements, I am now compelled to use WebERP in a PHP8 environment, which has caused many issues. I have managed to solve some problems on my own, but there are still many that I can't resolve. Therefore, I kindly request assistance here. I will gradually present my questions, hoping that you can help me find solutions.

Thank you!

Alex


1-When put customer receipt:
   
It seems to be a time format issue. Tim made changes to this file before, and it used to work fine. However, later on, there were date format errors appearing on other functional pages.

   

The error messages mentioned above don't seem to affect the functionality at the moment.
Reply
05-28-2023, 07:52 AM, (This post was last modified: 05-28-2023, 07:53 AM by ALEXSHEN.)
#2
RE: PHP 8.0 The pain that must be endured.
Finally, I found a solution:

1- In DateFunctions.inc, modify line 19
$DateEntry = trim($DateEntry ?? "");
to avoid having a NULL value.
2- Similarly, in MiscFunctions.php, modify line 284
return number_format(floatval($Number), $DecimalPlaces ?? 2, $DecimalPoint, $ThousandsSeparator);
to avoid having NULL as the value for $DecimalPlaces.

Of course, currently, I am just personally experimenting, and I don't know if it could cause any other harm, so please proceed with caution when trying these solutions.
Reply
05-28-2023, 08:02 AM,
#3
RE: PHP 8.0 The pain that must be endured.
In General Ledger -> Bank Account Payments Entry

Got error again

Deprecated: Creation of dynamic property Payment::$Paymenttype is deprecated in /www/wwwroot/erp-trade/webERP/Payments.php on line 185
   
Reply
05-28-2023, 08:57 AM,
#4
RE: PHP 8.0 The pain that must be endured.
Modify DefinePaymentClass.php line 5, put below code:

public $Paymenttype;

It seems that this solution may resolve the issue. You can give it a try and see if it works.
Reply
Yesterday, 04:18 AM,
#5
RE: PHP 8.0 The pain that must be endured.
New Problem:

When I selected Purchases->Purchase Order, the following error occurs again:

Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ASC, purchorders.realorderno, suppliers.suppname, purchorde' at line 25 in /erp/includes/ConnectDB_mysqli.inc:58 Stack trace: #0 /erp/includes/ConnectDB_mysqli.inc(58): mysqli_query() #1 /erp/PO_SelectOSPurchOrder.php(589): DB_query() #2 {main} thrown in /erp/includes/ConnectDB_mysqli.inc on line 58
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)