AndyB Well-known member Jul 18, 2013 #1 I'm getting the following Server Error Logs: This is due to me adding the following code to the session.php file: PHP: $my_style = $_COOKIE["style"]; What would be the best way to avoid getting the server error logs? My code is working perfectly. Thank you.
I'm getting the following Server Error Logs: This is due to me adding the following code to the session.php file: PHP: $my_style = $_COOKIE["style"]; What would be the best way to avoid getting the server error logs? My code is working perfectly. Thank you.
Jeremy in memoriam 1991-2020 Jul 18, 2013 #2 PHP: $my_style = XenForo_Application::get('options')->defaultStyleId; if(isset($_COOKIE['style'])) { $my_style = $_COOKIE['style']; } Its a good rule of thumb to always verify an index exists before accessing it.
PHP: $my_style = XenForo_Application::get('options')->defaultStyleId; if(isset($_COOKIE['style'])) { $my_style = $_COOKIE['style']; } Its a good rule of thumb to always verify an index exists before accessing it.
AndyB Well-known member Jul 18, 2013 #3 Hi King Kovifor, Thank you so much for helping. It turned out that replacing the line: $my_style = $_COOKIE["style"]; with $my_style = $request->getCookie('style'); solved my problem with the server error logs.
Hi King Kovifor, Thank you so much for helping. It turned out that replacing the line: $my_style = $_COOKIE["style"]; with $my_style = $request->getCookie('style'); solved my problem with the server error logs.