Warning (2): Undefined array key "HTTP_ACCEPT_LANGUAGE" [APP/Controller/LoginController.php, line 292]
Warning (512): Unable to emit headers. Headers sent in file=/home/lptstudy/public_html/vendor/cakephp/cakephp/src/Error/Debugger.php line=971 [CORE/src/Http/ResponseEmitter.php, line 71]
Warning (2): Cannot modify header information - headers already sent by (output started at /home/lptstudy/public_html/vendor/cakephp/cakephp/src/Error/Debugger.php:971) [CORE/src/Http/ResponseEmitter.php, line 168]
Warning (2): Cannot modify header information - headers already sent by (output started at /home/lptstudy/public_html/vendor/cakephp/cakephp/src/Error/Debugger.php:971) [CORE/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
        // $is_spanish = false;
        // if($ip_data['country'] == 'ES'){
        //     $is_spanish = true;
        // }
        $lang substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 02);
        $is_spanish false;
        if($lang == 'es'){
            $is_spanish true;
        }
Error in: ROOT/src/Controller/LoginController.php, line 292

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