Warning (2) : Undefined array key "HTTP_ACCEPT_LANGUAGE" [in /www/wwwroot/siyaratic.com/src/Controller/AppController.php, line 123]
Warning (512) : Unable to emit headers. Headers sent in file=/www/wwwroot/siyaratic.com/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php line=36 [in /www/wwwroot/siyaratic.com/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 71]
Warning (2) : Cannot modify header information - headers already sent by (output started at /www/wwwroot/siyaratic.com/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php:36) [in /www/wwwroot/siyaratic.com/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 168]
Warning (2) : Cannot modify header information - headers already sent by (output started at /www/wwwroot/siyaratic.com/vendor/cakephp/cakephp/src/Error/Renderer/HtmlErrorRenderer.php:36) [in /www/wwwroot/siyaratic.com/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 197]
Error: substr(): Argument #1 ($string) must be of type string, null given

substr(): Argument #1 ($string) must be of type string, null given 📋

TypeError
Toggle Vendor Stack Frames
            //setcookie("siyaratic_locale", "", time()-3600);
            I18n::setLocale($_COOKIE["siyaratic_locale"]);
        } else{
            //echo "<br /><br /><br /><br /><br /><br /><br />VIDE";
            $lang substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 02);
            //echo "<br /><br /><br /><br /><br /><br /><br />LOCALE == ".$lang;
            $acceptLang = ['fr''en']; 
            $lang in_array($lang$acceptLang) ? $lang '';
            //echo "<br /><br /><br /><br /><br /><br /><br />LOCALE == ".$lang;
Error in: ROOT/src/Controller/AppController.php, line 123

If you want to customize this error message, create templates/Error/error500.php