Codeigniter – The each() function is deprecated. This message will be suppressed on further calls

This is in fact an PHP 7.3 upgrade compatibility with older PHP scripts.
This is a quick fix for CodeIgniter.

Message: The each() function is deprecated. This message will be suppressed on further calls
Filename: core/Security.php | Line: 272

Quick fix
On line 272, of file application/system/core/Security.php there should be an ‘while’ with a ‘each’.
Make the following changes

        //while (list($key) = each($str))
        foreach($str as $key=>$str_values)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.