Freepbx Array and string offset access syntax with curly braces is deprecated

Error : freepbx Array and string offset access syntax with curly braces is deprecated

Solved : This error is because new PHP version doesn’t support curly brackets ( “{}” . So find the goto the line mentioned in the error message, and change curly bracket to square bracket ( {} to [] )
This problem will be solved easily.

This is the file /root/freepbx/amp_conf/htdocs/admin/libraries/Composer/vendor/neitanod/forceutf8/src/ForceUTF8/Encoding.php
and line number 196 and and 239 . change curly brackets.

What version of Framework and what version of PHP are you testing with?

Versions
FreePBX 15
and PHP 7.4.9
Ubundu 20.10

Also if you get error “Function get_magic_quotes_gpc() is deprecated” while opening the page in the browser

Comment the following lines.

    if(get_magic_quotes_gpc()) {
            $nt->add_error('core', 'MQGPC', _("Magic Quotes GPC"), _("You have magic_quotes_gpc enabled in your php.ini, http or .htaccess file which will cause errors in some modules. FreePBX expects this to be off and runs under that assumption"));
    } else {
            $nt->delete('core', 'MQGPC');
    }

7.4 is a step too far.

Only PHP 5.6 is officially supported. Unofficially, the community has things working with, and many of us use, php 7.3.

You will need to downgrade php to 7.3 or 5.6.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.