Issues

ZF-9146: Zend_Xmlrpc_Client converts null to array instead of a struct

Issue Type: Bug Created: 2010-02-11T05:39:11.000+0000 Last Updated: 2010-11-20T05:07:36.000+0000 Status: Closed Fix version(s): Reporter: Michael Weinrich (micxer) Assignee: Jan Pieper (jpieper) Tags: - Zend_XmlRpc_Client

Related issues: Attachments:

Description

If a remote method has an optional parameter, which defaults to null and a client actually try to pass null for that parameter, the Zend_XmlRpc_Client converts null into the data type expected by the remote method. This causes null to be converted into an array which in turn causes a signature mismatch.

The client shouldn't do that when null is given as an optional parameter.

Comments

Posted by Jan Pieper (jpieper) on 2010-11-20T05:07:36.000+0000

This isn't a bug. You need to add "null" to the @param tag.

<pre class="highlight">/**
 * @param array $list
 * @return string
 */
public function doSomething($list = null) {
    // ...
}


<pre class="highlight">/**
 * @param array|null $list
 * @return string
 */
public function doSomething($list = null) {
    // ...
}

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts