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 **Programming** > **PHP Methods**

![](https://help.scriptcase.net/galleryDocuments/edbsnce0cf3137bd85f8fd299a80f7a1b7af792abc153aa9a06e3ed6d0bc98f6bcd734a9ccffabcc728ff46ece69381e7f6c6?inline=true)

**2** - Inside the function **remember\_me\_validate**look for the line:

$code .= $chars{mt\_rand(0, $max)};

![](https://help.scriptcase.net/galleryDocuments/edbsn5dbf018ceb9285b85ff3076038286df778d39f15300d5459e1b40df56a8e1463881a66d18c18d122f030fff3ffd67ea7?inline=true)

**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.