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,
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!


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.
05-28-2023, 07:52 AM, (This post was last modified: 05-28-2023, 07:53 AM by ALEXSHEN.)
RE: PHP 8.0 The pain that must be endured.
Finally, I found a solution:

1- In, 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.
05-28-2023, 08:02 AM,
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
05-28-2023, 08:57 AM,
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.
Yesterday, 04:18 AM,
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/ Stack trace: #0 /erp/includes/ mysqli_query() #1 /erp/PO_SelectOSPurchOrder.php(589): DB_query() #2 {main} thrown in /erp/includes/ on line 58

Forum Jump:

Users browsing this thread: 1 Guest(s)