Undefined constant CodeIgniter\Router\Router::HTTP_METHODS - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Undefined constant CodeIgniter\Router\Router::HTTP_METHODS (/showthread.php?tid=91158) |
Undefined constant CodeIgniter\Router\Router::HTTP_METHODS - jetspeed - 06-25-2024 Hi guys, Can someone tell me what this error means? I can see the constant is defined in Router.php. Code: CRITICAL - 2024-06-25 16:30:02 --> Error: Undefined constant CodeIgniter\Router\Router::HTTP_METHODS PHP Code: class Router implements RouterInterface RE: Undefined constant CodeIgniter\Router\Router::HTTP_METHODS - InsiteFX - 06-25-2024 According to the PHP Manual: class constant are by default public in nature but they cannot be assigned visibility factor and in turn gives syntax error. PHP Code: <?php RE: Undefined constant CodeIgniter\Router\Router::HTTP_METHODS - jetspeed - 06-25-2024 Thanks, so is this a bug in the CI framework then? RE: Undefined constant CodeIgniter\Router\Router::HTTP_METHODS - kenjis - 06-25-2024 No. Quote:Note: See https://3v4l.org/o7LIW RE: Undefined constant CodeIgniter\Router\Router::HTTP_METHODS - jetspeed - 06-25-2024 Testing my code with CI_ENVIRONMENT = production, works fine. But on development, a critical error is thrown. Looks like something related to the debug toolbar. I've no idea to where to look, suggestions welcome. Code: CRITICAL - 2024-06-25 16:30:02 --> Error: Undefined constant CodeIgniter\Router\Router::HTTP_METHODS RE: Undefined constant CodeIgniter\Router\Router::HTTP_METHODS - kenjis - 06-26-2024 If the constant HTTP_METHODS is defined in CodeIgniter\Router\Router, I have no idea why the error occurs. |