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

Home » Imported messages » comp.lang.php » Please help clear up some php error notice issue?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Please help clear up some php error notice issue? [message #180036] Sat, 29 December 2012 03:12 Go to previous message
r.mariotti is currently offline  r.mariotti
Messages: 17
Registered: December 2011
Karma:
Junior Member
Since upgrading to version 5.4.x I've been seeing a common error
complaining about undefined variables.
I know that the E_Notice can be suppressed but I want to eliminate the
cause as well.

To address this issue I've added statements at the beginning of the
code to determine if the named variable is set and if not to set it to
null. This should then satisfy this complaint.

Here is what this code typically looks like:

if (!isset($Usage)) { $Usage = ''; }
if (!isset($_userid)) { $_userid = ''; }
if (!isset($_userno)) { $_userno = ''; }
if (!isset($V0)) { $V0 = ''; }

So my understanding is that references to any/all of the above defined
variables should NOT cause that error notice. However, it seems to
continue.

Without going bonkers would some of you who understand this somewhat
syntactical issue please try to explain the best way to handle this
issue so me and I'm sure many, many other php developers can once and
for all rid outselves of this so common issue?

Thanks.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Current PHP implementation
Next Topic: Create SQLite3 Version of PHP Manual from Docbooks
Goto Forum:
  

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

Current Time: Wed Jul 03 06:11:59 GMT 2024

Total time taken to generate the page: 0.05398 seconds