php.net |  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: simonslaws at googlemail dot com
New email:
PHP Version: OS:

 

 [2006-09-14 05:56 UTC] simonslaws at googlemail dot com
Description:
------------
SDO crashes when reading nillable elements that are explicitly set to nil. 

Reproduce code:
---------------
Schema

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

Input XML

<tns:RootElement39 xmlns:tns="http://www.apache.org/tuscany/interop"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.apache.org/tuscany/interop interop39.xsd">
	<ElementWithNillable/>
        <ElementWithNillable xsi:nil="true"/> 
</tns:RootElement39>

Expected result:
----------------
No Crash

Actual result:
--------------
Crash

Removing the Element

<ElementWithNillable xsi:nil="true"/>

Allows SDO to read the XML successfully. 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

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] cem@php.net
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-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 15:01:29 2024 UTC