Fatal error: Array and string offset access syntax with curly braces is no longer supported

Fatal error: Array and string offset access syntax with curly braces is no longer supported

You can come across this error when running a login application created by a security module generated before Scriptcase 9.8.
This error occurs only in an environment with PHP 8 or superior because of a change in the array elements access, that now allows just the use of square brackets [].

To fix it, follow the steps below:

1 - In your Login Application open the function remember_me_validate on the menu ProgrammingPHP Methods


2 - Inside the function remember_me_validate look for the line:
$code .= $chars{mt_rand(0, $max)};




3 - Replace the curly brackets { } in the variable $chars{mt_rand(0, $max)by square brackets [ ].

The code will be similar to this:
$code .= $chars[mt_rand(0, $max)];

4 - Now save the changes and generate the source code of the application.

    • Related Articles

    • Fatal error: Uncaught GuzzleHttp\Exception\RequestException

      The Fatal error: Uncaught GuzzleHttp\Exception\RequestException: cURL error can be displayed in the Scriptcase interface in two situations When using the Google-integrated Calendar application When using the Google Drive API So that the error doesn't ...
    • PHP error level - error_reporting

      The error_reporting directive in php.ini defines the levels of errors that PHP will report, the levels of errors are:   Errors and Logging Value Constant Description Note 1 E_ERROR (integer) Fatal run-time errors. These indicate errors that can not ...
    • Correcting access error for the Scriptcase database

      Sometimes we encounter an error accessing the Scriptcase database itself, as shown in the image below:   This problem happens when we change the folder name of the scriptcase to another name, such as "sc". Then, the error happens because the complete ...
    • 'No tables found in database access' error while trying to import Access data.

      This error occurs because it is necessary to have the Microsoft Access Database Engine installed, which contains a series of components that facilitate the transfer of information between files of Office for the other applications. For the ...
    • Fatal error: Allowed memory size

      When such errors occur, it is because the memory_size feature within the server's php.ini must be increased twice or as much as necessary. 1. Find the php.ini file with these sample paths: Linux: /opt/NetMake/v9/components/apache/conf Windows: ...