FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » way to turn off strict option? Use of undefined constant
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: way to turn off strict option? Use of undefined constant [message #177143 is a reply to message #177142] Thu, 23 February 2012 17:21 Go to previous messageGo to previous message
Michael Fesser is currently offline  Michael Fesser
Messages: 215
Registered: September 2010
Karma:
Senior Member
.oO(Paul)

> I installed a new version of PHP and now am getting errors on my pages
> that say:
>
> Notice: Use of undefined constant....
>
> Is there any way in the page that I can add some code so I do not get
> these errors?

You can turn off notices (see error_reporting()), but the errors still
exist and you should fix them as soon as possible. The above for example
is the result of accessing an array element with an unquoted string key:

$foo = $array[bar];

Correct would be:

$foo = $array['bar'];

Micha

--
http://mfesser.de/blickwinkel
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: PHP Version 5.3.6
Next Topic: Accessing IIS variables from PHP after URL Rewrite
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 17:25:31 GMT 2024

Total time taken to generate the page: 0.02809 seconds