Current location: Hot Scripts Forums » Programming Languages » PHP » Notice: Undefined variable:


Notice: Undefined variable:

Reply
  #1 (permalink)  
Old 01-17-05, 03:11 AM
netbakers's Avatar
netbakers netbakers is offline
Newbie Coder
 
Join Date: Dec 2004
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Notice: Undefined variable:

hi all,

i am working on a opensource php module. i got a message

"Notice: Undefined variable: "

is there any need to make change in php.ini ? or any other solution....?
__________________
---------------------------------------------------------

info@netbakers.com

http://www.netbakers.com/
Reply With Quote
  #2 (permalink)  
Old 01-17-05, 03:26 AM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
you can ignore notices but it's not a good practice ..
try to solve the problem..

anyway, you can suppress notices from php.ini in error_reporting
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Reply With Quote
  #3 (permalink)  
Old 01-17-05, 08:03 AM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
Quote:
Originally Posted by netbakers
hi all,

i am working on a opensource php module. i got a message

"Notice: Undefined variable: "
All this means is that you didn't explicitly declare the variable before you started using it. Technically this is a no-no, although I'm guilty of it too at times.

Proper one tenet of good coding is that you always declare variables, even if they're used in a trivial way.

I agree with Nevermind- you should fix this problem rather than ignore it. All in all, it's a bad idea to supress error messages, because they don't appear for no reason.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
what is the best method to find last word in variable ? GS300 PHP 6 09-15-04 09:13 PM
hidden variable problem scorpioy PHP 1 05-23-04 05:19 AM
Call a variable name dynamically Kenrette ASP 2 11-12-03 09:48 AM
Php Variable phppick PHP 4 08-15-03 08:54 PM
Php Variable Urgent phppick PHP 1 08-14-03 06:31 AM


All times are GMT -5. The time now is 05:27 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.