From: all4blitz at fftemple dot it
Operating system: Windows 2000 Professional
PHP version: 4.3.7
PHP Bug Type: Unknown/Other Function
Bug description: Notice:Undefinied index :user
Description:
------------
After any mysql query, php returns this string:
"Notice: Undefined index: user in d:\etc..."
"user" is the name of the mysql called field.
But the page still works perfectly.
Reproduce code:
---------------
$db=mysql_connect($host,$user,$pass);
mysql_select_db("sets", $db);
$query = "SELECT * FROM config LIMIT 0,1";
$result = mysql_query($query, $db);
while ($sr = mysql_fetch_array($settings)){
if($row["default"]=="Y"){
$url_noslash=$row["url_noslash"];
$siteurl=$row["url"];
$librerie_att=$row["librerie"];
$admin_user=$row["user"];
$admin_password=$row["password"];
$session_file=$row["sessionfile"];
$counter_hp=$row["contatore_hp"];
$counter_op=$row["contatore_op"];
$predlang=$row["lingua"];
$defaultpage=$row["homepage"];
$predskin=$row["skin"];
}
Expected result:
----------------
variable "$admin_user" equal to mysql field "user" to use in the
background
Actual result:
--------------
Notice: Undefined index: user in d:\etc... on line 11
--
Edit bug report at http://bugs.php.net/?id=29217&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29217&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29217&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=29217&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=29217&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29217&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=29217&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=29217&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=29217&r=support
Expected behavior: http://bugs.php.net/fix.php?id=29217&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=29217&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=29217&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=29217&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29217&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=29217&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=29217&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=29217&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29217&r=float