Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > #42571 : Method variable array's missing
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 6th August 15:00
External User
 
Posts: 1
Default #42571 : Method variable array's missing



ID: 42571
Updated by: jani@php.net
Reported By: rockerboo at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: SimpleXML related
Operating System: CentOS 5
PHP Version: 5.2.4
New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


Previous Comments:
------------------------------------------------------------------------

[2007-09-05 20:01:16] rockerboo at gmail dot com

Description:
------------
I create an SimpleXmlElement, and see if one of the member variable
array's in an array, and it says it is not. But I am able to foreach
through the array, and when I do, the key states they 2nd parent's key
as the key.

Linux virbdevel.com 2.6.18-8.1.4.el5.028stab035.1 #1 SMP Sat Jun 9
01:43:20 MSD 2007 i686

'./configure' '--with-apxs2=/usr/sbin/apxs'
'--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d'
'--libdir=/usr/lib' '--with-libdir=lib' '--with-mysql' '--with-mysqli'
'--with-pear' '--with-zlib' '--with-openssl' '--with-png'
'--with-jpeg-dir=/usr/lib' '--with-bz2' '--enable-bcmath'
'--enable-exif' '--with-fam' '--with-gd' '--enable-gd-native-ttf'
'--with-freetype-dir=/usr/lib' '--enable-gd-jis-conv' '--with-imap'
'--with-imap-ssl' '--enable-mbstring' '--with-iconv' '--with-mcrypt'
'--enable-shmop' '--enable-imap' '--enable-imap-ssl' '--with-kerberos'
'--with-xsl' '--with-dom' '--enable-soap' '--enable-simplexml'
'--with-mhash' '--with-curl' '--enable-calendar' '--enable-dbx'
'--with-xml' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg'
'--enable-track-vars' '--enable-trans-sid' '--enable-sockets'
'--enable-exif' '--enable-ftp' '--enable-magic-quotes'
'--disable-ffmpeg'

Reproduce code:
---------------
http://pastebin.com/f252f4872

Expected result:
----------------

SimpleXMLElement Object
(
[@attributes] => Array
(
[type] => array
)

[status] => Array
(
[0] => SimpleXMLElement Object
(
[created_at] => Wed Sep 05 18:06:54 +0000 2007
[id] => 249403592
[text] => Everyone that gets the new iPod Touch
automatically receives a iPhone Wannabe t-shirt and decal.
[source] => twitterrific
[user] => SimpleXMLElement Object
(
[id] => 5871202
[name] => Brad
[screen_name] => stillframe
[location] => Boston, USA
[description] => drunk and in jail for
arson
[profile_image_url] =>
http://assets1.twitter.com/system/user/profile_image/5871202/normal/noobbrad_x150.jpg?1187756051
[url] => http://stillframe.com
[protected] => false
)

)

[1] => SimpleXMLElement Object
(
[created_at] => Wed Sep 05 18:02:46 +0000 2007
[id] => 249393302
[text] => iPodTouch? No. iPodBadTouch. Don't touch
your iPod that way.
[source] => twitterrific
[user] => SimpleXMLElement Object
(
[id] => 5871202
[name] => Brad
[screen_name] => stillframe
[location] => Boston, USA
[description] => drunk and in jail for
arson
[profile_image_url] =>
http://assets1.twitter.com/system/user/profile_image/5871202/normal/noobbrad_x150.jpg?1187756051
[url] => http://stillframe.com
[protected] => false
)

)

[2] => SimpleXMLElement Object
(
[created_at] => Wed Sep 05 17:10:46 +0000 2007
[id] => 249255522
[text] => Dear coffee, I forgot to say hi this
morning. Apple event is kicking off. Expect more neglect.
[source] => twitterrific
[user] => SimpleXMLElement Object
(
[id] => 5871202
[name] => Brad
[screen_name] => stillframe
[location] => Boston, USA
[description] => drunk and in jail for
arson
[profile_image_url] =>
http://assets1.twitter.com/system/user/profile_image/5871202/normal/noobbrad_x150.jpg?1187756051
[url] => http://stillframe.com
[protected] => false
)

)

[3] => SimpleXMLElement Object
(
[created_at] => Wed Sep 05 01:44:00 +0000 2007
[id] => 247693942
[text] => If the Hood blimp ever crashed (upside
down), it would say pooH. Just a random epiphony.
[source] => txt
[user] => SimpleXMLElement Object
(
[id] => 5871202
[name] => Brad
[screen_name] => stillframe
[location] => Boston, USA
[description] => drunk and in jail for
arson
[profile_image_url] =>
http://assets1.twitter.com/system/user/profile_image/5871202/normal/noobbrad_x150.jpg?1187756051
[url] => http://stillframe.com
[protected] => false
)

)

[4] => SimpleXMLElement Object
(
[created_at] => Wed Sep 05 00:25:31 +0000 2007
[id] => 247569882
[text] => Working way too late. Must. leave. now.
In happier news, Simmy and I put the wraps on the Noob Tee Store. More
tomorrow.
[source] => twitterrific
[user] => SimpleXMLElement Object
(
[id] => 5871202
[name] => Brad
[screen_name] => stillframe
[location] => Boston, USA
[description] => drunk and in jail for
arson
[profile_image_url] =>
http://assets1.twitter.com/system/user/profile_image/5871202/normal/noobbrad_x150.jpg?1187756051
[url] => http://stillframe.com
[protected] => false
)

)

)

)
is_array($sxe->status): false
SimpleXMLElement Object
(
[created_at] => Wed Sep 05 18:06:54 +0000 2007
[id] => 249403592
[text] => Everyone that gets the new iPod Touch automatically
receives a iPhone Wannabe t-shirt and decal.
[source] => twitterrific
[user] => SimpleXMLElement Object
(
[id] => 5871202
[name] => Brad
[screen_name] => stillframe
[location] => Boston, USA
[description] => drunk and in jail for arson
[profile_image_url] =>
http://assets1.twitter.com/system/user/profile_image/5871202/normal/noobbrad_x150.jpg?1187756051
[url] => http://stillframe.com
[protected] => false
)

)
0
SimpleXMLElement Object
(
[created_at] => Wed Sep 05 18:06:54 +0000 2007
[id] => 249403592
[text] => Everyone that gets the new iPod Touch automatically
receives a iPhone Wannabe t-shirt and decal.
[source] => twitterrific
[user] => SimpleXMLElement Object
(
[id] => 5871202
[name] => Brad
[screen_name] => stillframe
[location] => Boston, USA
[description] => drunk and in jail for arson
[profile_image_url] =>
http://assets1.twitter.com/system/user/profile_image/5871202/normal/noobbrad_x150.jpg?1187756051
[url] => http://stillframe.com
[protected] => false
)

)
1
SimpleXMLElement Object
(
[created_at] => Wed Sep 05 18:02:46 +0000 2007
[id] => 249393302
[text] => iPodTouch? No. iPodBadTouch. Don't touch your iPod that
way.
[source] => twitterrific
[user] => SimpleXMLElement Object
(
[id] => 5871202
[name] => Brad
[screen_name] => stillframe
[location] => Boston, USA
[description] => drunk and in jail for arson
[profile_image_url] =>
http://assets1.twitter.com/system/user/profile_image/5871202/normal/noobbrad_x150.jpg?1187756051
[url] => http://stillframe.com
[protected] => false
)

)
2
SimpleXMLElement Object
(
[created_at] => Wed Sep 05 17:10:46 +0000 2007
[id] => 249255522
[text] => Dear coffee, I forgot to say hi this morning. Apple event
is kicking off. Expect more neglect.
[source] => twitterrific
[user] => SimpleXMLElement Object
(
[id] => 5871202
[name] => Brad
[screen_name] => stillframe
[location] => Boston, USA
[description] => drunk and in jail for arson
[profile_image_url] =>
http://assets1.twitter.com/system/user/profile_image/5871202/normal/noobbrad_x150.jpg?1187756051
[url] => http://stillframe.com
[protected] => false
)

)
3
SimpleXMLElement Object
(
[created_at] => Wed Sep 05 01:44:00 +0000 2007
[id] => 247693942
[text] => If the Hood blimp ever crashed (upside down), it would
say pooH. Just a random epiphony.
[source] => txt
[user] => SimpleXMLElement Object
(
[id] => 5871202
[name] => Brad
[screen_name] => stillframe
[location] => Boston, USA
[description] => drunk and in jail for arson
[profile_image_url] =>
http://assets1.twitter.com/system/user/profile_image/5871202/normal/noobbrad_x150.jpg?1187756051
[url] => http://stillframe.com
[protected] => false
)

)
4
SimpleXMLElement Object
(
[created_at] => Wed Sep 05 00:25:31 +0000 2007
[id] => 247569882
[text] => Working way too late. Must. leave. now. In happier news,
Simmy and I put the wraps on the Noob Tee Store. More tomorrow.
[source] => twitterrific
[user] => SimpleXMLElement Object
(
[id] => 5871202
[name] => Brad
[screen_name] => stillframe
[location] => Boston, USA
[description] => drunk and in jail for arson
[profile_image_url] =>
http://assets1.twitter.com/system/user/profile_image/5871202/normal/noobbrad_x150.jpg?1187756051
[url] => http://stillframe.com
[protected] => false
)

)

------------------------------------------------------------------------------------------

is_array($status): true
Array
(
[0] => fubble Object
(
[var1] => whatever
[var2] => whatever2
[var3] => whatever3
[var4] => whatever4
[var5] => whatever5
)

[1] => fubble Object
(
[var1] => whatever
[var2] => whatever2
[var3] => whatever3
[var4] => whatever4
[var5] => whatever5
)

[2] => fubble Object
(
[var1] => whatever
[var2] => whatever2
[var3] => whatever3
[var4] => whatever4
[var5] => whatever5
)

[3] => fubble Object
(
[var1] => whatever
[var2] => whatever2
[var3] => whatever3
[var4] => whatever4
[var5] => whatever5
)

[4] => fubble Object
(
[var1] => whatever
[var2] => whatever2
[var3] => whatever3
[var4] => whatever4
[var5] => whatever5
)

)
0
fubble Object
(
[var1] => whatever
[var2] => whatever2
[var3] => whatever3
[var4] => whatever4
[var5] => whatever5
)
1
fubble Object
(
[var1] => whatever
[var2] => whatever2
[var3] => whatever3
[var4] => whatever4
[var5] => whatever5
)
2
fubble Object
(
[var1] => whatever
[var2] => whatever2
[var3] => whatever3
[var4] => whatever4
[var5] => whatever5
)
3
fubble Object
(
[var1] => whatever
[var2] => whatever2
[var3] => whatever3
[var4] => whatever4
[var5] => whatever5
)
4
fubble Object
(
[var1] => whatever
[var2] => whatever2
[var3] => whatever3
[var4] => whatever4
[var5] => whatever5
)


Actual result:
--------------
SimpleXMLElement Object
(
[@attributes] => Array
(
[type] => array
)

[status] => Array
(
[0] => SimpleXMLElement Object
(
[created_at] => Wed Sep 05 18:06:54 +0000 2007
[id] => 249403592
[text] => Everyone that gets the new iPod Touch
automatically receives a iPhone Wannabe t-shirt and decal.
[source] => twitterrific
[user] => SimpleXMLElement Object
(
[id] => 5871202
[name] => Brad
[screen_name] => stillframe
[location] => Boston, USA
[description] => drunk and in jail for
arson
[profile_image_url] =>
http://assets1.twitter.com/system/user/profile_image/5871202/normal/noobbrad_x150.jpg?1187756051
[url] => http://stillframe.com
[protected] => false
)

)

[1] => SimpleXMLElement Object
(
[created_at] => Wed Sep 05 18:02:46 +0000 2007
[id] => 249393302
[text] => iPodTouch? No. iPodBadTouch. Don't touch
your iPod that way.
[source] => twitterrific
[user] => SimpleXMLElement Object
(
[id] => 5871202
[name] => Brad
[screen_name] => stillframe
[location] => Boston, USA
[description] => drunk and in jail for
arson
[profile_image_url] =>
http://assets1.twitter.com/system/user/profile_image/5871202/normal/noobbrad_x150.jpg?1187756051
[url] => http://stillframe.com
[protected] => false
)

)

[2] => SimpleXMLElement Object
(
[created_at] => Wed Sep 05 17:10:46 +0000 2007
[id] => 249255522
[text] => Dear coffee, I forgot to say hi this
morning. Apple event is kicking off. Expect more neglect.
[source] => twitterrific
[user] => SimpleXMLElement Object
(
[id] => 5871202
[name] => Brad
[screen_name] => stillframe
[location] => Boston, USA
[description] => drunk and in jail for
arson
[profile_image_url] =>
http://assets1.twitter.com/system/user/profile_image/5871202/normal/noobbrad_x150.jpg?1187756051
[url] => http://stillframe.com
[protected] => false
)

)

[3] => SimpleXMLElement Object
(
[created_at] => Wed Sep 05 01:44:00 +0000 2007
[id] => 247693942
[text] => If the Hood blimp ever crashed (upside
down), it would say pooH. Just a random epiphony.
[source] => txt
[user] => SimpleXMLElement Object
(
[id] => 5871202
[name] => Brad
[screen_name] => stillframe
[location] => Boston, USA
[description] => drunk and in jail for
arson
[profile_image_url] =>
http://assets1.twitter.com/system/user/profile_image/5871202/normal/noobbrad_x150.jpg?1187756051
[url] => http://stillframe.com
[protected] => false
)

)

[4] => SimpleXMLElement Object
(
[created_at] => Wed Sep 05 00:25:31 +0000 2007
[id] => 247569882
[text] => Working way too late. Must. leave. now.
In happier news, Simmy and I put the wraps on the Noob Tee Store. More
tomorrow.
[source] => twitterrific
[user] => SimpleXMLElement Object
(
[id] => 5871202
[name] => Brad
[screen_name] => stillframe
[location] => Boston, USA
[description] => drunk and in jail for
arson
[profile_image_url] =>
http://assets1.twitter.com/system/user/profile_image/5871202/normal/noobbrad_x150.jpg?1187756051
[url] => http://stillframe.com
[protected] => false
)

)

)

)
is_array($sxe->status): false
SimpleXMLElement Object
(
[created_at] => Wed Sep 05 18:06:54 +0000 2007
[id] => 249403592
[text] => Everyone that gets the new iPod Touch automatically
receives a iPhone Wannabe t-shirt and decal.
[source] => twitterrific
[user] => SimpleXMLElement Object
(
[id] => 5871202
[name] => Brad
[screen_name] => stillframe
[location] => Boston, USA
[description] => drunk and in jail for arson
[profile_image_url] =>
http://assets1.twitter.com/system/user/profile_image/5871202/normal/noobbrad_x150.jpg?1187756051
[url] => http://stillframe.com
[protected] => false
)

)
status
SimpleXMLElement Object
(
[created_at] => Wed Sep 05 18:06:54 +0000 2007
[id] => 249403592
[text] => Everyone that gets the new iPod Touch automatically
receives a iPhone Wannabe t-shirt and decal.
[source] => twitterrific
[user] => SimpleXMLElement Object
(
[id] => 5871202
[name] => Brad
[screen_name] => stillframe
[location] => Boston, USA
[description] => drunk and in jail for arson
[profile_image_url] =>
http://assets1.twitter.com/system/user/profile_image/5871202/normal/noobbrad_x150.jpg?1187756051
[url] => http://stillframe.com
[protected] => false
)

)
status
SimpleXMLElement Object
(
[created_at] => Wed Sep 05 18:02:46 +0000 2007
[id] => 249393302
[text] => iPodTouch? No. iPodBadTouch. Don't touch your iPod that
way.
[source] => twitterrific
[user] => SimpleXMLElement Object
(
[id] => 5871202
[name] => Brad
[screen_name] => stillframe
[location] => Boston, USA
[description] => drunk and in jail for arson
[profile_image_url] =>
http://assets1.twitter.com/system/user/profile_image/5871202/normal/noobbrad_x150.jpg?1187756051
[url] => http://stillframe.com
[protected] => false
)

)
status
SimpleXMLElement Object
(
[created_at] => Wed Sep 05 17:10:46 +0000 2007
[id] => 249255522
[text] => Dear coffee, I forgot to say hi this morning. Apple event
is kicking off. Expect more neglect.
[source] => twitterrific
[user] => SimpleXMLElement Object
(
[id] => 5871202
[name] => Brad
[screen_name] => stillframe
[location] => Boston, USA
[description] => drunk and in jail for arson
[profile_image_url] =>
http://assets1.twitter.com/system/user/profile_image/5871202/normal/noobbrad_x150.jpg?1187756051
[url] => http://stillframe.com
[protected] => false
)

)
status
SimpleXMLElement Object
(
[created_at] => Wed Sep 05 01:44:00 +0000 2007
[id] => 247693942
[text] => If the Hood blimp ever crashed (upside down), it would
say pooH. Just a random epiphony.
[source] => txt
[user] => SimpleXMLElement Object
(
[id] => 5871202
[name] => Brad
[screen_name] => stillframe
[location] => Boston, USA
[description] => drunk and in jail for arson
[profile_image_url] =>
http://assets1.twitter.com/system/user/profile_image/5871202/normal/noobbrad_x150.jpg?1187756051
[url] => http://stillframe.com
[protected] => false
)

)
status
SimpleXMLElement Object
(
[created_at] => Wed Sep 05 00:25:31 +0000 2007
[id] => 247569882
[text] => Working way too late. Must. leave. now. In happier news,
Simmy and I put the wraps on the Noob Tee Store. More tomorrow.
[source] => twitterrific
[user] => SimpleXMLElement Object
(
[id] => 5871202
[name] => Brad
[screen_name] => stillframe
[location] => Boston, USA
[description] => drunk and in jail for arson
[profile_image_url] =>
http://assets1.twitter.com/system/user/profile_image/5871202/normal/noobbrad_x150.jpg?1187756051
[url] => http://stillframe.com
[protected] => false
)

)

------------------------------------------------------------------------------------------

is_array($status): true
Array
(
[0] => fubble Object
(
[var1] => whatever
[var2] => whatever2
[var3] => whatever3
[var4] => whatever4
[var5] => whatever5
)

[1] => fubble Object
(
[var1] => whatever
[var2] => whatever2
[var3] => whatever3
[var4] => whatever4
[var5] => whatever5
)

[2] => fubble Object
(
[var1] => whatever
[var2] => whatever2
[var3] => whatever3
[var4] => whatever4
[var5] => whatever5
)

[3] => fubble Object
(
[var1] => whatever
[var2] => whatever2
[var3] => whatever3
[var4] => whatever4
[var5] => whatever5
)

[4] => fubble Object
(
[var1] => whatever
[var2] => whatever2
[var3] => whatever3
[var4] => whatever4
[var5] => whatever5
)

)
0
fubble Object
(
[var1] => whatever
[var2] => whatever2
[var3] => whatever3
[var4] => whatever4
[var5] => whatever5
)
1
fubble Object
(
[var1] => whatever
[var2] => whatever2
[var3] => whatever3
[var4] => whatever4
[var5] => whatever5
)
2
fubble Object
(
[var1] => whatever
[var2] => whatever2
[var3] => whatever3
[var4] => whatever4
[var5] => whatever5
)
3
fubble Object
(
[var1] => whatever
[var2] => whatever2
[var3] => whatever3
[var4] => whatever4
[var5] => whatever5
)
4
fubble Object
(
[var1] => whatever
[var2] => whatever2
[var3] => whatever3
[var4] => whatever4
[var5] => whatever5
)


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=42571&edit=1
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666