From:             jeffdafoe at gmail dot com
Operating system: CentOS linux, Debian stable
PHP version:      5.3.21
Package:          SOAP related
Bug Type:         Bug
Bug description:SoapClient weirdness when passed undefined connection_timeout

Description:
------------
When SoapClient is passed an undefined variable in the connection_timeout
hash key, it seems that all global variables are initialized to 0.  

I can reproduce this on multiple linux distributions and PHP versions.  I
can also repro it using any WSDL.  It only happens when connection_timeout
is set to an uninitialized variable, I am not able to reproduce it in any
other case.  I discovered it by accident but figured I'd report it due to
the unusual and seemingly wide impact of the resultant behavior.


Test script:
---------------
$myi = null;
print 'Before: myi->foo=' . $myi->foo . ' fakevar=' . $fakevar . '
fakeobj->prop=' . $fakeobj->prop . "\n";

$url = 'http://soap.amazon.com/schemas2/AmazonWebServices.wsdl';
$sc = new SoapClient($url,
  array(
    'connection_timeout'=>$foo
  )
);

print 'After: myi->foo=' . $myi->foo . ' fakevar=' . $fakevar . '
fakeobj->prop=' . $fakeobj->prop . "\n";


Expected result:
----------------
 myi->foo= fakevar= fakeobj->prop=

Actual result:
--------------
 myi->foo=0 fakevar=0 fakeobj->prop=0

-- 
Edit bug report at https://bugs.php.net/bug.php?id=64101&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=64101&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=64101&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=64101&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=64101&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=64101&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=64101&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=64101&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=64101&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=64101&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=64101&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=64101&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=64101&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=64101&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64101&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=64101&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=64101&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=64101&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=64101&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=64101&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=64101&r=mysqlcfg

Reply via email to