|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78143 SoapClient::__construct with no arguments cannot be caught
Submitted: 2019-06-11 12:47 UTC Modified: 2021-03-23 16:56 UTC
From: gadelat at gmail dot com Assigned: cmb (profile)
Status: Not a bug Package: SOAP related
PHP Version: 7.3.6 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
33 - 11 = ?
Subscribe to this entry?

 [2019-06-11 12:47 UTC] gadelat at gmail dot com
So this is PHP 7.3 BC break and I can't find it in

Constructing SoapClient with no arguments can no longer be caught. It's very likely other classes are affected as well. Where can I read about this BC break?

PS: Sorry for not selecting soap package when creating issue, but I don't see it anywhere in a list

Test script:
try { new SoapClient(); } catch (Throwable $e) {} // PHP 7.2 no output, PHP 7.3 result:  Warning: SoapClient::SoapClient() expects at least 1 parameter, 0 given in php shell code on line 1


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-06-11 13:41 UTC]
-Package: *General Issues +Package: SOAP related
 [2019-06-11 14:15 UTC]
This behavioral change has been introduced by fixing bug #77088.
 [2021-03-23 14:25 UTC]
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2021-03-23 14:25 UTC]
Well, the first parameter to SoapClient::__construct() is supposed
to be mandatory, this is not even a change that should be
documented, but rather the mentioned bug fix established the
proper behavior.
 [2021-03-23 16:56 UTC] gadelat at gmail dot com
This bug report isn't reporting that PHP 7.3 started to complain about user not passing in required parameters. Both PHP 7.2 and 7.3 did do that already. Difference here is that this error cannot be caught since PHP 7.3 anymore.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Mar 22 06:03:37 2023 UTC