|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57504 nulls lost on clone()
Submitted: 2007-01-31 11:47 UTC Modified: 2007-04-26 11:34 UTC
From: Assigned: tuscany (profile)
Status: Closed Package: SCA_SDO (PECL)
PHP Version: 5.1.6 OS: WinXP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
New email:
PHP Version: OS:


 [2007-01-31 11:47 UTC]
I assign nulls to properties of an SDO then clone it. The nulls do not get into the cloned object. 

It does not matter by the way whether or not I have nillable="true" in the schema. 

Reproduce code:

$xsd = <<<EOF
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns=""
  <complexType name="personType">
      <element name="name" type="string"/>
      <element name="dob" type="string"/>
      <element name="pob" type="string"/>


$xmldas = SDO_DAS_XML::create('person.xsd');

$person = $xmldas->createDataObject('PersonNamespace','personType');

$person->name = "William Shakespeare'";
$person->dob = null;
$person->pob = null;

$person2 = clone($person);
echo "\n";


Expected result:
I want to see nulls in dob abd pob for $person2. 

Actual result:
object(SDO_DataObject)#3 (3) {name=>"William Shakespeare'"; dob=>NULL; pob=>NULL}
object(SDO_DataObject)#4 (3) {name=>"William Shakespeare'"; dob; pob}


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-04-26 11:34 UTC]
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

In case this was a 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-2022 The PHP Group
All rights reserved.
Last updated: Tue Jan 18 07:06:35 2022 UTC