1 (edited by seahawk 10/19/2023 02:36:13 pm)

Topic: Sales Tab - PHP8.2

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

When I switch back to php 8.1 it goes away.

Wynand

2 (edited by seahawk 01/10/2024 02:41:54 pm)

Re: Sales Tab - PHP8.2

Has this issue been resolved?

It seems that The warning message I am seeing is related to the use of a feature in PHP called “dynamic properties”. Dynamic properties allow you to set and get object properties by using variable names, like you are doing in the __construct method of your database class. They indicate that this feature has been deprecated in PHP 8.2 and later versions.


How do we fix this in the frontaccounting.php?

I am using FA 2.4.17 and PHP 8.2

See the lines in the comment below.

Wynand

3 (edited by seahawk 01/10/2024 02:42:36 pm)

Re: Sales Tab - PHP8.2

This is the content before and after line 66 in the frontaccounting.php file.

function display()
        {
            global $path_to_root;
           
            include_once($path_to_root . "/themes/".user_theme()."/renderer.php");

            $this->init();
            $rend = new renderer();
            $rend->wa_header();

            $rend->display_applications($this);

65            $rend->wa_footer();
66            $this->renderer =& $rend;
67        }

When I refresh the page it goes away. Do not know what is the issue?

Wynand

Re: Sales Tab - PHP8.2

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

Wynand

Re: Sales Tab - PHP8.2

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: Sales Tab - PHP8.2

This is a dublicate of another topic.

Please go to this topic.

.https://frontaccounting.com/punbb/viewtopic.php?id=10451

Joe