[eluser]BrianL[/eluser]
Hi,
My apologies if this has been posted before.
Was wondering if anyone came across this issue of using numbers in class names:
Try extending controller. Very simple stuff.
/system/application/libraries/MY_Controller0.php
Code:
<?php
class MY_Controller0 extends Controller {
function MY_Controller0()
{
parent::Controller();
}
}
?>
/system/application/controllers/Check.php
Code:
<?php
class Check extends MY_Controller0 {
function Check()
{
parent::MY_Controller0();
}
}
?>
Now it does not work with the number 0, or _0 and gives a PHP class not found error in the logs. But remove the zero, and it works.
Code:
[28-Jun-2010 19:22:59] PHP Fatal error: Class 'MY_Controller0' not found in /system/application/controllers/Check.php on line 3
Tested on a fresh, clean install of CodeIgniter 1.7.2 and code cut and pasted. Simply delete the zeroes, and it works. Add in the zeroes and it does not (yes, there are zeroes in two places in Check.php and three places in MY_Controller0.php including the file name).
Also confirmed I have saved in correct file format UTF-8 without BOM with UNIX line returns, and uploaded in binary mode.
Please someone test this themselves, since it is driving me crazy