php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46548 NULL return values in complex objects are not returned
Submitted: 2008-11-11 17:24 UTC Modified: 2008-11-15 11:30 UTC
From: rob at kinesissurvey dot com Assigned:
Status: Not a bug Package: SOAP related
PHP Version: 5.2.6 OS: Linux
Private report: No CVE-ID: None
 [2008-11-11 17:24 UTC] rob at kinesissurvey dot com
Description:
------------
Null elements are ignored, instead of being returned as null.

I believe this is the same as bug #41745; however, the bug system would not let me post my comment there (maybe because it's in "Feedback" status?), so I'm posting it here.  Since this bug has existed for over a year, a new bug report probably won't hurt things.

I have a small test case.  This bug is still present in PHP 5.2.6, and based on the 5.3 alpha notes, it has not been fixed there yet, either.

Reproduce code:
---------------
http://web4.kinesissurvey.com/rproject/sv500/nullbugclient.php

Notice the "status" key is missing from the second array element.

The wsdl file being used is at:
http://web4.kinesissurvey.com/rproject/sv500/wsdl/panel/nullbug.wsdl

You can get the source at:
http://web4.kinesissurvey.com/rproject/sv500/nullbug.zip

Expected result:
----------------
Array
(
    [0] => Array
        (
            [id] => 1
            [name] => Survey number 1
            [uri] => http://www.kinesissurvey.com/html.pro?ID=1
            [status] => completed
        )

    [1] => Array
        (
            [id] => 2
            [name] => Survey number 2
            [uri] => http://www.kinesissurvey.com/html.pro?ID=2
            [status] => 
        )

)

Actual result:
--------------
Array
(
    [0] => Array
        (
            [id] => 1
            [name] => Survey number 1
            [uri] => http://www.kinesissurvey.com/html.pro?ID=1
            [status] => completed
        )

    [1] => Array
        (
            [id] => 2
            [name] => Survey number 2
            [uri] => http://www.kinesissurvey.com/html.pro?ID=2
        )

)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-11-11 17:45 UTC] rob at kinesissurvey dot com
The wsdl file moved, so please ignore that link.  The wsdl is included in the zip file, anyway.
 [2008-11-15 11:30 UTC] felipe@php.net
Duplicated - Bug #46419
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Dec 06 21:03:34 2021 UTC