Error

PHP Warningyii\base\ErrorException

Invalid argument supplied for foreach()

$_GET = [
    'lang' => 'az',
];

$_SERVER = [
    'TZ' => 'Asia/Baku',
    'REDIRECT_REDIRECT_UNIQUE_ID' => 'X8nMl0atUdVOdqY9@pintwAAAAg',
    'REDIRECT_REDIRECT_SCRIPT_URL' => '/az/error',
    'REDIRECT_REDIRECT_SCRIPT_URI' => 'http://www.yenihayat.az/az/error',
    'REDIRECT_REDIRECT_STATUS' => '200',
    'REDIRECT_UNIQUE_ID' => 'X8nMl0atUdVOdqY9@pintwAAAAg',
    'REDIRECT_SCRIPT_URL' => '/az/error',
    'REDIRECT_SCRIPT_URI' => 'http://www.yenihayat.az/az/error',
    'REDIRECT_HANDLER' => 'application/x-httpd-ea-php56',
    'REDIRECT_STATUS' => '200',
    'UNIQUE_ID' => 'X8nMl0atUdVOdqY9@pintwAAAAg',
    'SCRIPT_URL' => '/az/error',
    'SCRIPT_URI' => 'http://www.yenihayat.az/az/error',
    'HTTP_HOST' => 'www.yenihayat.az',
    'HTTP_X_FORWARDED_HOST' => 'www.yenihayat.az',
    'HTTP_X_FORWARDED_PORT' => '80',
    'HTTP_X_FORWARDED_PROTO' => 'http',
    'HTTP_X_FORWARDED_SERVER' => 'www.yenihayat.az',
    'HTTP_X_REAL_IP' => '::ffff:18.214.23.30',
    'HTTP_USER_AGENT' => 'CCBot/2.0 (https://commoncrawl.org/faq/)',
    'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
    'HTTP_ACCEPT_LANGUAGE' => 'en-US,en;q=0.5',
    'PATH' => '/usr/local/jdk/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin:/opt/bin',
    'SERVER_SIGNATURE' => '',
    'SERVER_SOFTWARE' => 'Apache',
    'SERVER_NAME' => 'www.yenihayat.az',
    'SERVER_ADDR' => '109.127.8.238',
    'SERVER_PORT' => '80',
    'REMOTE_ADDR' => '18.214.23.30',
    'DOCUMENT_ROOT' => '/var/www/hayatadm/public_html',
    'REQUEST_SCHEME' => 'http',
    'CONTEXT_PREFIX' => '/cgi-sys',
    'CONTEXT_DOCUMENT_ROOT' => '/usr/local/cpanel/cgi-sys/',
    'SERVER_ADMIN' => 'webmaster@yenihayat.az',
    'SCRIPT_FILENAME' => '/var/www/hayatadm/public_html/frontend/web/index.php',
    'REMOTE_PORT' => '58706',
    'REDIRECT_URL' => '/frontend/web/index.php',
    'GATEWAY_INTERFACE' => 'CGI/1.1',
    'SERVER_PROTOCOL' => 'HTTP/1.1',
    'REQUEST_METHOD' => 'GET',
    'QUERY_STRING' => '',
    'REQUEST_URI' => '/az/error',
    'SCRIPT_NAME' => '/frontend/web/index.php',
    'ORIG_SCRIPT_FILENAME' => '/usr/local/cpanel/cgi-sys/ea-php56',
    'ORIG_PATH_INFO' => '/frontend/web/index.php',
    'ORIG_PATH_TRANSLATED' => '/var/www/hayatadm/public_html/frontend/web/index.php',
    'ORIG_SCRIPT_NAME' => '/cgi-sys/ea-php56',
    'PHP_SELF' => '/frontend/web/index.php',
    'REQUEST_TIME_FLOAT' => 1607060631.105452060699462890625,
    'REQUEST_TIME' => 1607060631,
    'argv' => [],
    'argc' => 0,
];

$_SESSION = [
    '__flash' => [],
    'language.lang' => 'az',
];