Hi
Im using a specific job cms for my client.
Currently its just setup on the site with no MySQL data. Its working.
I downloaded the code and sql and set it up on my PC.
When I ran the site locally there were many notices - most (or all I think) are because of unknown constants.
Example :
Notice: Use of undefined constant d - assumed 'd' in C:\xxx\xxx.php on line n
When I looked at the code, it like this
$day = date(d);
obviously I changed it to $day = date("d"); and the notice went away.
But I find the entire code is like that - $arrayname[variable] when it should have been $arrayname[$variable].
How is this acceptable ? This cms was bought by my client and I dont understand how these many notices were left out - these dont show in the site though maybe because of display_errors = off.
Thanks
[SOLVED] - Constants Usage
Moderator: General Moderators
[SOLVED] - Constants Usage
Last edited by anjanesh on Fri Jun 03, 2005 1:26 am, edited 1 time in total.
Re: Constants Usage
Many developers develop with warnings display off, because they are just warnings, and they think its okay to ignore them.anjanesh wrote: How is this acceptable ? This cms was bought by my client and I dont understand how these many notices were left out - these dont show in the site though maybe because of display_errors = off.
Obviously, most people here would disagree with that, and I personall don't consider it acceptable for an application to spew warnings.
Talk to the company you purchased it from - perhaps they have a new version, or would be interested in bug fixes for that issue.