CI 3.1.1 Index/index gives 404 |
I believe there is a bug in 3.1.1, or at least when migrating from 3.1.0 to 3.1.1 - the index method of Index controller stops working and gives 404.
I used this migration guide. http://www.codeigniter.com/user_guide/in...e_311.html
Index::index() has always been a "reserved" name because it's a PHP4-style constructor. It has never worked without causing problems, nothing to do with CI 3.1.1, nor with CI at all for that matter.
(10-24-2016, 10:17 AM)RBX Wrote:(10-24-2016, 10:11 AM)Narf Wrote: Index::index() has always been a "reserved" name because it's a PHP4-style constructor. It has never worked without causing problems, nothing to do with CI 3.1.1, nor with CI at all for that matter. It maybe didn't trigger a 404, but it deffinately didn't work "perfectly well". (10-24-2016, 10:27 AM)Narf Wrote:(10-24-2016, 10:17 AM)RBX Wrote:(10-24-2016, 10:11 AM)Narf Wrote: Index::index() has always been a "reserved" name because it's a PHP4-style constructor. It has never worked without causing problems, nothing to do with CI 3.1.1, nor with CI at all for that matter. I believe Index::index() isn't treated as a constructor if an explicit __construct is present, so why does this cause an issue? (10-24-2016, 11:45 AM)RBX Wrote:(10-24-2016, 10:27 AM)Narf Wrote:(10-24-2016, 10:17 AM)RBX Wrote:(10-24-2016, 10:11 AM)Narf Wrote: Index::index() has always been a "reserved" name because it's a PHP4-style constructor. It has never worked without causing problems, nothing to do with CI 3.1.1, nor with CI at all for that matter. You're right to believe that, but we can't arbitrarily require a (often otherwise useless) __construct() for Index::index().
PHP 4 constructors are deprecated in PHP 7.0, but at least until they are removed such Index::index names won't be just a normal combination.
So its not usable, the same way as it wasn't in the past.. Once this PHP 4 constructors are fully removed in some future 7.x or even at PHP 8, this combination will be ok I think to exists and work. Best VPS Hosting : Digital Ocean
|
Welcome Guest, Not a member yet? Register Sign In |