Edit report at https://bugs.php.net/bug.php?id=62639&edit=1

 ID:                 62639
 Updated by:         acuri...@php.net
 Reported by:        alexshock at yandex dot ru
-Summary:            XML structure broken
+Summary:            Cannot call constructor
-Status:             Assigned
+Status:             Open
 Type:               Bug
-Package:            SimpleXML related
+Package:            SPL related
-Operating System:   debian 6.0.5
+Operating System:   Windows XP
-PHP Version:        5.4.5
+PHP Version:        5.3.6
 Assigned To:        acurioso
 Block user comment: N
 Private report:     N



Previous Comments:
------------------------------------------------------------------------
[2012-07-29 23:16:31] willfi...@php.net

Andrew -

Would you mind taking a look at this? I reverted 
1e3b32c777829f61fa9a18278e0647e9112d96ea locally, and array typecasting works 
fine without the patch.  Also, this patch causes the last child in an element 
to 
be skipped in the case pointed out in this 
report.  I wanted to get your input before I move forward with any changes.

------------------------------------------------------------------------
[2012-07-27 21:27:52] willfi...@php.net

Confirmed in 5.4.5.  In the process of verifying the change(s) that introduced 
this issue:

--------------------------------------------------------------------------------
object(A)#2 (1) {
  ["@attributes"]=>
  array(1) {
    ["attr"]=>
    string(9) "Some Attr"
  }
}
--------------------------------------------------------------------------------
object(A)#3 (2) {
  ["@attributes"]=>
  array(1) {
    ["attr"]=>
    string(9) "Some Attr"
  }
  [0]=>
  string(10) "Some Value"
}
--------------------------------------------------------------------------------

------------------------------------------------------------------------
[2012-07-23 11:16:31] alexshock at yandex dot ru

Description:
------------
In PHP 5.4.0 and higher SimpleXMLElement works strange when trying to obtain 
children nodes (see test.php source for details).
Works fine in 5.3.x, I found that this issue occurs after this commit in php 
git repo: 1e3b32c777829f61fa9a18278e0647e9112d96ea

Test script:
---------------
https://www.dropbox.com/s/j0i47y7q4n4g0g6/test.php



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



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62639&edit=1

Reply via email to