|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64101 SoapClient weirdness when passed undefined connection_timeout
Submitted: 2013-01-29 21:00 UTC Modified: 2021-02-12 23:59 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: jeffdafoe at gmail dot com Assigned: cmb (profile)
Status: Closed Package: SOAP related
PHP Version: 5.3.21 OS: CentOS linux, Debian stable
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: jeffdafoe at gmail dot com
New email:
PHP Version: OS:


 [2013-01-29 21:00 UTC] jeffdafoe at gmail dot com
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 = '';
$sc = new SoapClient($url,

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-10-08 14:07 UTC] nampuom at gmail dot com
I confirm this bug.

Linux CentOS PHP 5.4.20 affected
Linux Fentoo PHP 5.3.18 also affected

It was very hard to locate this bug.

Also we see this behavior:

If try access to sub-element of non-existent array, then parent array initialize to 0.

Test script:
#$_SESSION['application'] = array();
$_SESSION['application']['id'] = 123;

Expected result:

Actual result:
 [2021-02-12 13:50 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-02-12 13:50 UTC]
I cannot reproduce this with PHP-7.4.  Can anybody else still
reproduce this with any of the actively supported PHP versions[1]?

[1] <>
 [2021-02-12 23:56 UTC] jeffdafoe at gmail dot com
-Status: Feedback +Status: Assigned
 [2021-02-12 23:56 UTC] jeffdafoe at gmail dot com
At this point, if you can't repro it I'd just close it. The bug is so old and could've been a manifestation of something long since fixed. I do appreciate you attempting to reproduce it.
 [2021-02-12 23:59 UTC] jeffdafoe at gmail dot com
-Status: Assigned +Status: Closed
 [2021-02-12 23:59 UTC] jeffdafoe at gmail dot com
Oops, been a while since using this bug tracking system. Closing.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 26 17:01:31 2024 UTC