Topic: PHP to 8.2 errors with FA 2.4.17

When I set my PHP to 8.2 with FA 2.4.17 the following error shows:

Creation of dynamic property front_accounting::$renderer is deprecated in file: /home/mydomain/public_html/accounts/frontaccounting.php at line 66 in Sales TAB when FA opens. When I refresh the page the error goes away.

When I switch back to php 8.1 it goes away.

--------------------------------------------------------

Another error on PHP 8.2 when you want to add a new direct invoice for a client:

Unhandled exception [0]: Attempt to assign property "reference" on null. in file: /home/mysite/public_html/accounts/sales/sales_order_entry.php at line 267

----------------------------------------------------------------------------------------------
Another PHP8.2 Error when you do a trial balance in Exel

Creation of dynamic property Spreadsheet_Excel_Writer_Parser::$ptg is deprecated in file: /home/mysite/public_html/accounts/reporting/includes/Workbook.php at line 2412

There are 26 lines of errors in workbook.php

Creation of dynamic property FrontReport::$formatRight is deprecated in file: /home/mysite/public_html/accounts/reporting/includes/excel_report.inc at line 127

6 lines of errors in excel_report.inc

Wynand

Re: PHP to 8.2 errors with FA 2.4.17

FA is not fully ready for php8.2. It's still having several updates. So wait for next major release to move forward with php 8.2

Subscription service based on FA
HRM CRM POS batch Themes

Re: PHP to 8.2 errors with FA 2.4.17

@seahawk

Regarding first error line 66 in frontaccounting.php: Creation of dynamic property front_accounting::$renderer is deprecated in file.

Please insert the following line 31 in frontaccounting.php:

var $renderer = null;

It should remove the 8.2 error, right? Please tell me.

Regarding second error line 267 in sales_order_entry.php. Please change the line to:

$cart->reference = get_post('ref');

Please tell me if it helps, thanks.

Regarding the third error, I need some time to fix the workbook.php file. This is not our own, so I have to fixi the file.
Will be back on this.

Joe

Re: PHP to 8.2 errors with FA 2.4.17

@seahawk and @kvvaradha

Hello again,

I have now fixed the Workbook.php1 and the exel_report.inc files.

Please download them, rename Workbook.php1 to Workbook.php and replace on your test server. Tell me if all the deprecation errors have vanished. (They should).

If this is also ok, then we can commit the files to stable repo.

Post's attachments

excel_report.inc 23.3 kb, 4 downloads since 2024-01-16 

Workbook.php1 297.6 kb, 4 downloads since 2024-01-16 

You don't have the permssions to download the attachments of this post.

Re: PHP to 8.2 errors with FA 2.4.17

I understand that you guys are very busy.

Anyhow, I am sure the fixes are ok and I am pushing the files to stable repo now.

Joe

6 (edited by arunkumartomail 02/23/2024 07:08:50 pm)

Re: PHP to 8.2 errors with FA 2.4.17

Please note that FrontAccounting 2.4.16 unknown error in the server based. Could anyone can provide me solution. Screen shot attached here.
There is no error only it shows error symbol.

Post's attachments

Screenshot from 2024-02-23 20-03-20.png 178.6 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: PHP to 8.2 errors with FA 2.4.17

Screenshot missing.
Check the Post release notes for FA 2.4.16 and later:
https://frontaccounting.com/punbb/viewtopic.php?id=10282
Check CHANGELOG for your version:

2023-10-10 Joe Hunt
Release 2.4.17
M    version.php

2023-09-22 Joe Hunt
Bug Found in Supplier Invoice in Calculating Unit Tax
M    purchasing/includes/db/invoice_db.inc

2023-09-21 Joe Hunt
New empty language empty.po file
M    lang/new_language_template/LC_MESSAGES/empty.po

2023-08-07/08 Joe Hunt
PHP 8.2 fixes - 4 commits
M    admin\includes\fa_patch.class.inc
M    includes\hooks.inc
M    includes\prefs\userprefs.inc
M    includes\ui\allocation_cart.inc
M    includes\ui\attachment.inc
M    includes\ui\contacts_view.inc
M    purchasing\inquiry\supplier_inquiry.php
M    reporting\rep110.php
M    reporting\includes\class.graphic.inc
M    sales\includes\cart_class.inc
M    sales\inquiry\customer_inquiry.php

2023-08-01/06 Joe Hunt
Added Payment Link (Payment Service) for XUMM. A Dutch free Payment Service and re-run
M    includes/ui/ui_view.inc

2023-05-03 / 2023-07-03 Joe Hunt
Mark Inactive Customers and Suppliers in Reports (when no Filter). Bug 5709: Calculation fixed.
M    reporting/rep101.php
M    reporting/rep102.php
M    reporting/rep115.php
M    reporting/rep201.php
M    reporting/rep202.php
M    reporting/rep203.php
M    reporting/rep206.php

2023-05-03 Joe Hunt
Release 2.4.16
M    lang/new_language_template/LC_MESSAGES/empty.po
M    version.php

Re: PHP to 8.2 errors with FA 2.4.17

joe wrote:

I understand that you guys are very busy.

Anyhow, I am sure the fixes are ok and I am pushing the files to stable repo now.

Joe

Thank you for the changes. I have updated it as indicated by you and it works, the errors have gone.

Sorry for not coming back earlier, I did not receive the notification.

I appreciate your assistance. I trust that this will be correct in future updates.

Wynand

Re: PHP to 8.2 errors with FA 2.4.17

On the setup Tab/ Company Setup gives the following error when adding the company logo and selecting update:

Creation of dynamic property TCPDF::$padding is deprecated in file: /home/mysite/public_html/accounts/reporting/includes/tcpdf.php at line 1172

Wynand

Re: PHP to 8.2 errors with FA 2.4.17

[23-Feb-2024 19:29:00 UTC] 0:stalwartshopping:gettext.inc:74:[before upgrade] strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated
[23-Feb-2024 19:29:00 UTC] 0:stalwartshopping:gettext.inc:75:[before upgrade] strtolower(): Passing null to parameter #1 ($string) of type string is deprecated
[23-Feb-2024 19:29:00 UTC] 0:stalwartshopping:JsHttpRequest.php:166:[before upgrade] preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated
[23-Feb-2024 19:29:00 UTC] 0:stalwartshopping:JsHttpRequest.php:167:[before upgrade] strtolower(): Passing null to parameter #1 ($string) of type string is deprecated
[23-Feb-2024 19:29:00 UTC] 0:stalwartshopping:connect_db_mysqli.inc:282: Trying to access array offset on value of type null
[23-Feb-2024 19:29:00 UTC] 0:stalwartshopping:connect_db_mysqli.inc:282: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated
I\m getting error

Re: PHP to 8.2 errors with FA 2.4.17

Update your FA to make it work.

Subscription service based on FA
HRM CRM POS batch Themes

Re: PHP to 8.2 errors with FA 2.4.17

Get the following message after the above updates:

"This edit session has been abandoned by opening sales document in another browser tab. You cannot edit more than one sales document at once."

This happened after I loaded a new customer and wanted to issue a direct invoice. I was still in the same tab. Using Edge.

Wynand

Re: PHP to 8.2 errors with FA 2.4.17

@seahawk
This is an old issue for Windows installations. We are working on that. In the meantime please set the following variabel in config.php to 1:

$no_check_edit_conflicts = 1;

Joe
PS. This is NOT a php8 bug. This issue range over several php versions.

Re: PHP to 8.2 errors with FA 2.4.17

Thanks Joe.

Wynand

Re: PHP to 8.2 errors with FA 2.4.17

Were these changes implemented in 2.4.18, since after the update I had to make the changes again on the same files since the errors reappeared?

Wynand

Re: PHP to 8.2 errors with FA 2.4.17

So its working out now? It is a pretty old plugin, and looks like php has changed to be quite a bit more strict recently.
downgrade php or upgrade FA are best bets

Re: PHP to 8.2 errors with FA 2.4.17

trafficpest wrote:

So its working out now? It is a pretty old plugin, and looks like php has changed to be quite a bit more strict recently.
downgrade php or upgrade FA are best bets

I cannot downgrade on PHP since I am running Joomla sites where I need the higher PHP. @Joe solutions above worked, but when I upgraded to 2.4.18 the errors above reappeared, so I just used my replacement files and then we were up and running again.

Wynand