Hi all
PHP Noob here.
Does anyone know what differences could exist between a live webserver and my production environment to cause a function to work online, but fail locally?
I have taken over a project and one of the functions that is used on every page is defined thusly:
Wherever the function is called, it is called like this:
Now, when I run this locally, I get the expected PHP error that the method is missing an input parameter. However, this same code seems to run fine online. Any ideas why? Could it be a difference in PHP version? OS version? Something like "on error resume next" turned on for the webserver? I don't get it.
I can fix this easily by putting an empty string '' into the method calls, but I hesitate to change something that appears to be working online.
Any advice is appreciated.
PHP Noob here.
Does anyone know what differences could exist between a live webserver and my production environment to cause a function to work online, but fail locally?
I have taken over a project and one of the functions that is used on every page is defined thusly:
Code:
public function getFooter($extras){
//etc
}
Wherever the function is called, it is called like this:
Code:
<?php echo $header->getFooter(); ?>
Now, when I run this locally, I get the expected PHP error that the method is missing an input parameter. However, this same code seems to run fine online. Any ideas why? Could it be a difference in PHP version? OS version? Something like "on error resume next" turned on for the webserver? I don't get it.
I can fix this easily by putting an empty string '' into the method calls, but I hesitate to change something that appears to be working online.
Any advice is appreciated.