|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57235 Explicitly marking a nillable element as nil crashes SDO on read
Submitted: 2006-09-14 05:56 UTC Modified: 2007-04-25 07:33 UTC
From: simonslaws at googlemail dot com Assigned:
Status: Not a bug Package: SCA_SDO (PECL)
PHP Version: 5.1.4 OS: XP
Private report: No CVE-ID: None
 [2006-09-14 05:56 UTC] simonslaws at googlemail dot com
SDO crashes when reading nillable elements that are explicitly set to nil. 

Reproduce code:

  <element name="RootElement39">
        <element name="ElementWithNillable" type="string" nillable="true" maxOccurs="unbounded"/>  

Input XML

<tns:RootElement39 xmlns:tns=""
	xsi:schemaLocation=" interop39.xsd">
        <ElementWithNillable xsi:nil="true"/> 

Expected result:
No Crash

Actual result:

Removing the Element

<ElementWithNillable xsi:nil="true"/>

Allows SDO to read the XML successfully. 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-04-24 18:21 UTC]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PECL.

I tried to run this but the schema is incomplete and is failing. Please supply a complete testcase.
 [2007-04-25 07:33 UTC]
Thank you for taking the time to write to us, but this is not
a bug.

I tried this again, and got the schema to load this time (my mistake previously). However I did not see a crash as you reported, but the message:

Fatal error: Uncaught exception 'SDO_UnsupportedOperationException' with message 'Setting a list to null is not supported:ElementWithNillable' in C:\dev\pecl\sdo\tests\SDO\phpt\bug8694.php:35

which seems self-explanatory. Removing 'maxoccurs="unbounded"' from the schema cause the tests to run OK.

It may be you think it should be possible to set the list to nil, as it does represent a valid schema. If so, please raise a different bug.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Dec 01 07:03:34 2021 UTC