Setting 404 Status Code |
Recently discovered that my 404 override was throwing errors silently into the logs in production. Trying to troubleshoot it this morning.
This is my code in the app/Config/Routes.php file: PHP Code: $routes->set404Override(static function() { This produces an error message in the log (in production) (Line 23 being the $response->setStatusCode(404) line): Code: CRITICAL - 2023-06-21 21:30:31 --> Undefined property: CodeIgniter\Router\RouteCollection::$response Code: ErrorException I thought I was following the manual, but maybe I am missing something. Any help/suggestions would be appreciated. Marc |
Messages In This Thread |
Setting 404 Status Code - by SoccerGuy3 - 06-22-2023, 07:46 AM
RE: Setting 404 Status Code - by Mni.day - 06-22-2023, 02:36 PM
RE: Setting 404 Status Code - by kenjis - 06-22-2023, 02:53 PM
RE: Setting 404 Status Code - by Mni.day - 06-23-2023, 08:11 PM
RE: Setting 404 Status Code - by Leo - 10-05-2023, 12:03 AM
RE: Setting 404 Status Code - by SoccerGuy3 - 10-13-2023, 08:11 AM
|