[SOLVED] Codeigniter: The each() function is deprecated

Masalah: ketika mengaktifkan $config['global_xss_filtering'] = TRUE;
Solusi:
Edit file /system/core/Security.php
Ubah :
public function xss_clean($str, $is_image = FALSE)
{
// Is the string an array?
if (is_array($str))
{
while (list($key) = each($str))
{
$str[$key] = $this->xss_clean($str[$key]);
}
return $str;
}

Jadi
public function xss_clean($str, $is_image = FALSE)
{
// Is the string an array?
if (is_array($str))
{
                        foreach($str as $key => $val) {
$str[$key] = $this->xss_clean($str[$key]);
                        }
return $str;
}

Komentar

Postingan populer dari blog ini

[SOLVED] Pengalaman Upgrade Internet ICONNET 10Mbps Jadi 20Mbps

Cara Keluar Dari Scaled Mode di VirtualBox

Cara Mengatasi Error Mikrotik - Web Browser Did Not Send Challenge Response (Try Again, Enable JavaScript)