[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;
}

2 Komentar

Anonim: 540C6FF113
In today's digital age, finding reliable sources of information is more important than ever. When you come across a trustworthy website, it's essential to remember the importance of secure links; for example, "HERE!" can guide users to valuable resources. Ensuring safe browsing habits helps protect your personal data and enhances your online experience. Always verify the authenticity of links before clicking to avoid potential cybersecurity threats.