php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63357 Notice: Array to string conversion
Submitted: 2012-10-25 09:13 UTC Modified: -
Votes:8
Avg. Score:3.8 ± 1.4
Reproduced:6 of 7 (85.7%)
Same Version:3 (50.0%)
Same OS:2 (33.3%)
From: thomas dot lallement at 9online dot fr Assigned:
Status: Open Package: SOAP related
PHP Version: 5.3.18 OS: Ubuntu 12.04
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: thomas dot lallement at 9online dot fr
New email:
PHP Version: OS:

 

 [2012-10-25 09:13 UTC] thomas dot lallement at 9online dot fr
Description:
------------
Hi,

I found a problem when calling a method of a web service with a parameter defined like this:

<xsd:complexType name="FormDefinitionTO">
    <xsd:sequence>
        <xsd:element maxOccurs="unbounded" minOccurs="0" name="activeEmails" nillable="true" type="xsd:string"/>
    </xsd:sequence>
</xsd:complexType>

When I call like this, it works. I receive an object with a list of activeEmails:

public function testList() {
    $formDefinitionTO = new FormDefinitionTO();
    $formDefinitionTO->activeEmails = array('0' => 'test 1', '0' => 'test 2');
    $user = $this->soapClient->testList($formDefinitionTO);
}

But if I change the array keys (for example):

public function testList() {
    $formDefinitionTO = new FormDefinitionTO();
    $formDefinitionTO->activeEmails = array('1' => 'test 1', '2' => 'test 2');
    $user = $this->soapClient->testList($formDefinitionTO);
}

I have the following error Notice: Array to string conversion




Patches

Pull Requests

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 07:01:28 2025 UTC