|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57390 Error on printing open types
Submitted: 2006-11-23 05:45 UTC Modified: 2006-12-13 07:01 UTC
From: simonslaws at googlemail dot com Assigned: cem (profile)
Status: Closed Package: SCA_SDO (PECL)
PHP Version: 5_2 CVS-2006-11-23 OS: Win XP
Private report: No CVE-ID: None
 [2006-11-23 05:45 UTC] simonslaws at googlemail dot com
In investigating a flaw in the CDATA change I notice that print_r isn;t working properly with open types

Reproduce code:
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="" 

    <complexType name="TestType" mixed="true">
            <element name="jim" type="string"/>
            <any namespace="##any" processContents="lax"/>            
    <element name="test" type="tns:TestType"/>        

<?xml version="1.0" encoding="UTF-8"?>
<tns:test xmlns:tns="" 
          xsi:schemaLocation=" cdata2.xsd ">
  <jim>xxx<![CDATA[some data and some <MoreXML></MoreXML>]]></jim>
  <entry>xxx<![CDATA[some data and some <MoreXML></MoreXML>]]></entry>

$xmldas   = SDO_DAS_XML::create("cdata2.xsd");
$document = $xmldas->loadFile("cdata2.xml");
$root     = $document->getRootDataObject();
echo $xmldas->__toString() . "\n";
echo $xmldas->saveString($document);

Expected result:
print_r($root) to provide similar information as is provided by saveString albeit in a different format.

Actual result:
object(SDO_DAS_XML)#1 {
19 types have been defined. The types and their properties are::
1. commonj.sdo:BigDecimal
2. commonj.sdo:BigInteger
3. commonj.sdo:Boolean
4. commonj.sdo:Byte
5. commonj.sdo:Bytes
6. commonj.sdo:ChangeSummary
7. commonj.sdo:Character
8. commonj.sdo:DataObject
9. commonj.sdo:Date
10. commonj.sdo:Double
11. commonj.sdo:Float
12. commonj.sdo:Integer
13. commonj.sdo:Long
14. commonj.sdo:OpenDataObject
15. commonj.sdo:Short
16. commonj.sdo:String
17. commonj.sdo:URI
    - test (
    - jim (commonj.sdo:String)
<?xml version="1.0" encoding="UTF-8"?>
<test xmlns="" xmlns:tns2="commonj.sdo" xmlns:tns="ht
  <jim>xxx&lt;![CDATA[some data and some &lt;MoreXML&gt;&lt;/MoreXML&gt;]]&gt;</
  <tns2:entry xsi:type="OpenDataObject" xmlns:xsi="
ema-instance">xxxXXXCDATA@STARTXXXsome data and some &lt;MoreXML&gt;&lt;/MoreXML
SDO_DataObjectImpl Object
    [jim] => xxx<![CDATA[some data and some <MoreXML></MoreXML>]]>
    [entry] => SDO_DataObjectList Object
PHP Fatal error:  print_r(): internal error (286) - unexpected DataObject type 1
8 in C:\simon\Projects\Eclipse3.2\phpscripts\cdata.php on line 24


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-28 12:39 UTC]
I'm discussing this one with the Tuscany team - not sure yet where the problem lies.
 [2006-12-13 07:01 UTC]
Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download at

Added support for OpenDataObjectType
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Apr 01 08:03:37 2023 UTC