php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57514 clone object with null crashes PHP
Submitted: 2007-02-07 11:51 UTC Modified: 2007-04-26 11:34 UTC
From: mfp@php.net Assigned: tuscany (profile)
Status: Closed Package: SCA_SDO (PECL)
PHP Version: 5.1.6 OS: WinXP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
41 + 13 = ?
Subscribe to this entry?

 
 [2007-02-07 11:51 UTC] mfp@php.net
Description:
------------
The attached testcase crashes PHP when run under ZS, and when run under Apache

Reproduce code:
---------------
<?php

$order_xsd = <<<EOF
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:ord="orderNS" xmlns:cust="customerNS" targetNamespace="orderNS">

  <include schemaLocation="./Customer.xsd"/>

  <element name="order" type="ord:OrderType">
    <complexType name="OrderType">
      <sequence>
        <element ref="cust:customer"/>
      </sequence>
    </complexType>
  </element>

</schema>
EOF;

file_put_contents('Order.xsd',$order_xsd);


$customer_xsd = <<<EOF2
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
 xmlns:cust="customerNS" targetNamespace="customerNS">
  <element name="customer" type="cust:CustomerType">
    <complexType name="CustomerType">
      <sequence>
      </sequence>
    </complexType>
  </element>

</schema>
EOF2;

file_put_contents('Customer.xsd',$customer_xsd);


$xmldas = SDO_DAS_XML::create('Order.xsd');
$order = $xmldas->createDataObject('orderNS','OrderType');
$order->customer = null;

$o = clone $order;

?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-04-26 11:34 UTC] cem@php.net
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.

Fix will be in next release RSN
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 05:01:28 2024 UTC