Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.6.0a3

Bug #9042 Various uninitialized variables
Submitted: 2006-10-15 10:27 UTC
From: jo at durchholz dot org Assigned: aidan
Status: Closed Package: PHP_Compat (version 1.5.0)
PHP Version: Irrelevant OS: Any
Roadmaps: 1.6.0a1    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 6 - 2 = ?

 
 [2006-10-15 10:27 UTC] jo at durchholz dot org (Joachim Durchholz)
Description: ------------ Here's a list of places where Eclipse found uninitialized variables, with fixes: array_walk.php, line 41: $user_func should be $funcname. strpbrk.php, line 43: $needle should be $char_list. The following are not bugs, but they cause Eclipse to carp about possibly uninitialized variables since it doesn't grok assignments inside an eval() call. I suggest replacing eval ("\$var = ..."); with $var = NULL; eval ("\$var = ..."); I know this is silly, but it will make the really important warnings stand out in Eclipse and help catch uninitialized variable errors elsewhere. The affected code lines are here: call_user_func_array, line 73 ($retval) constant.php, line 44 ($value)

Comments

 [2006-12-14 07:17 UTC] aidan (Aidan Lister)
array_walk_recursive.php, fixed. strpbrk, already fixed in cvs. I've modified call_user_func_array and constant as suggested, I think it's worth while and it's certainly not doing any harm. Thank you very much for your report.