NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Spurious array entry while debugging


Joined: 17 Dec 2004
Posts: 11
Location: Surrey, England
Reply with quote
I have just noticed the following while debugging:

Code: $array = array();
Hover mouse over $array shows: $array: array = :undefined = NULL

Code: $array[] = 'first';
Hover mouse over $array shows: $array: array = :undefined = NULL, 0:string = first

There is this spurious entry ':undefined = NULL' which causes problems when I try to iterate all the array entries which are supposed to have non-null keys and non-null values.

_________________
Tony Marston

http://www.tonymarston.net
View user's profileFind all posts by TonyMarstonSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 7901
Reply with quote
Debugger does not change/alter any variables on its own.
I'd recommend you to check what you have in Watch window.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 17 Dec 2004
Posts: 11
Location: Surrey, England
Reply with quote
You are correct! My watch window contained $array[$localname] where $localname did not exist. I have removed this watch, and the problem has disappeared.

_________________
Tony Marston

http://www.tonymarston.net
View user's profileFind all posts by TonyMarstonSend private messageVisit poster's website
Spurious array entry while debugging
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic