Error

PHP Warningyii\base\ErrorException

Invalid argument supplied for foreach()

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

$_SERVER = [
    'CONTEXT_DOCUMENT_ROOT' => '/var/www/hayatadm/public_html',
    'CONTEXT_PREFIX' => '',
    'DOCUMENT_ROOT' => '/var/www/hayatadm/public_html',
    'GATEWAY_INTERFACE' => 'CGI/1.1',
    'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
    'HTTP_ACCEPT_LANGUAGE' => 'en-US,en;q=0.5',
    'HTTP_CPANEL_LOCALHOST' => '1',
    'HTTP_HOST' => 'www.yenihayat.az',
    'HTTP_USER_AGENT' => 'CCBot/2.0 (https://commoncrawl.org/faq/)',
    'HTTP_X_FORWARDED_FOR' => '3.238.173.209',
    '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' => '3.238.173.209',
    'PATH' => '/bin:/usr/bin',
    'PHP_INI_SCAN_DIR' => '/opt/cpanel/ea-php56/root/etc:/opt/cpanel/ea-php56/root/etc/php.d:.',
    'QUERY_STRING' => '',
    'REDIRECT_SCRIPT_URI' => 'http://www.yenihayat.az/az/error',
    'REDIRECT_SCRIPT_URL' => '/az/error',
    'REDIRECT_STATUS' => '200',
    'REDIRECT_UNIQUE_ID' => 'YJ88T@QKjn2QrrUjk0ynjAAAAAg',
    'REDIRECT_URL' => '/az/error',
    'REDIRECT_isproxyrequest' => '1',
    'REMOTE_ADDR' => '109.127.8.238',
    'REMOTE_PORT' => '45920',
    'REQUEST_METHOD' => 'GET',
    'REQUEST_SCHEME' => 'http',
    'REQUEST_URI' => '/az/error',
    'SCRIPT_FILENAME' => '/var/www/hayatadm/public_html/frontend/web/index.php',
    'SCRIPT_NAME' => '/frontend/web/index.php',
    'SCRIPT_URI' => 'http://www.yenihayat.az/az/error',
    'SCRIPT_URL' => '/az/error',
    'SERVER_ADDR' => '109.127.8.238',
    'SERVER_ADMIN' => 'webmaster@yenihayat.az',
    'SERVER_NAME' => 'www.yenihayat.az',
    'SERVER_PORT' => '80',
    'SERVER_PROTOCOL' => 'HTTP/1.1',
    'SERVER_SIGNATURE' => '',
    'SERVER_SOFTWARE' => 'Apache',
    'TZ' => 'Asia/Baku',
    'UNIQUE_ID' => 'YJ88T@QKjn2QrrUjk0ynjAAAAAg',
    'isproxyrequest' => '1',
    'PHP_SELF' => '/frontend/web/index.php',
    'REQUEST_TIME_FLOAT' => 1621048399.34428310394287109375,
    'REQUEST_TIME' => 1621048399,
    'argv' => [],
    'argc' => 0,
];

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