Re: Quick Question
| From: | php3 at developersdesk dot com | Date: | Thu, 13 Jul 2000 01:20:35 +0000 |
| Subject: | Re: Quick Question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-6343@lists.php.net to get a copy of this message | ||
Addressed to: "Jeff Wilhelm" <jeffwilhelm@hotmail.com>
"Thomas Deliduka" <thomas@neweve.com>
"PHP List" <php-general@lists.php.net>
** Reply to note from "Jeff Wilhelm" <jeffwilhelm@hotmail.com> Wed, 12 Jul 2000
15:27:01 -0400
>
> Unfortunately I have no control over recompiling it, so is there any
> way to supress the error messages from the code?
>
> > >
> > > Warning: Use of undefined constant ______
> > >
> > > Is there any quick way to stop those messages from coming up?
> >
> > I think if you compile it with --disable-debug it will remove those
> > messages.
Put quotes around the undefined 'constants'.
An unquoted alpha string in php code is interpreted as a constant. If
there is no defined value for the string, the name is used as the value,
and the warning is issued.
If you put single qoutes around it it is no longer a constant, but has
the string value you would have gotten from the undefined constant
route.
For example:
$Array[ One ] becomes $Array[ 'One' ]
And the error message
Warning: use of undefined constant One
goes away.
Rick Widmer
Internet Marketing Specialists
www.developersdesk.com