php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33659 php_soap.dll problem with arrays
Submitted: 2005-07-12 14:42 UTC Modified: 2005-07-12 15:42 UTC
From: wase1 at gmx dot net Assigned:
Status: Not a bug Package: SOAP related
PHP Version: 5.0.4 OS: Win 2K SP 4 + IIS 5.0
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: wase1 at gmx dot net
New email:
PHP Version: OS:

 

 [2005-07-12 14:42 UTC] wase1 at gmx dot net
Description:
------------
Sorry, my englisch is bad.

Problem:
I try tu use extension php_soap.dll with IIS 5.0 to build a webservice client.

If my eMail ist static $param->EmailAddress = "wase1@gtmx.net"; no problem.

If it is dynamic $param->EmailAddress = "$e"; Problem:

Fatal error:  Uncaught SoapFault exception: [soap:Server] Server was unable to process request. --> Index was outside the bounds of the array. in c:\Inetpub\wwwroot\walter\index.php:52
Stack trace:
#0 c:\Inetpub\wwwroot\walter\index.php(52): SoapClient->__call('IsValidEMail', Array)
#1 c:\Inetpub\wwwroot\walter\index.php(52): SoapClient->IsValidEMail(Object(stdClass))
#2 {main}
  thrown in c:\Inetpub\wwwroot\walter\index.php on line 52

Reproduce code:
---------------
<?
if(!empty($_REQUEST['email'])){
$WSDL='http://www.webservicex.net/ValidateEmail.asmx?WSDL';
$soapclient = new SoapClient($WSDL);

echo "<br><pre>";
$e = trim($_REQUEST['email']);
$arr = array();
$arr['EmailAddress'] = "$e";

$res = $soapclient->IsValidEMail($arr);

print_r($res);

echo "<hr>";

if(!empty($res->IsValidEMailResult))
echo "$e Is eMail";
else
echo "$e Is No eMail";

echo "</pre><br>";

}
?>

Expected result:
----------------
I wrote everything in the Description.

Actual result:
--------------
I wrote everything in the Description.

Fatal error:  Uncaught SoapFault exception: [soap:Server] Server was unable to process request. --> Index was outside the bounds of the array. in c:\Inetpub\wwwroot\walter\index.php:52
Stack trace:
#0 c:\Inetpub\wwwroot\walter\index.php(52): SoapClient->__call('IsValidEMail', Array)
#1 c:\Inetpub\wwwroot\walter\index.php(52): SoapClient->IsValidEMail(Object(stdClass))
#2 {main}
  thrown in c:\Inetpub\wwwroot\walter\index.php on line 52

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-12 15:21 UTC] tony2001@php.net
Set $e to "blah" and you'll get the same error.
Not PHP bug -> bogus.
 [2005-07-12 15:42 UTC] wase1 at gmx dot net
sorry, i have to correct something:

This works:
not: $param->EmailAddress = "wase1@gtmx.net";
correct is: $arr['EmailAddress'] = "wase1@gtmx.net";

But this not. $e is not empty!
not: $param->EmailAddress = "$e";
correct is: $arr['EmailAddress'] = "$e";

$email was submitted by Get or Post ==> $e

Thank You!
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC