php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70469 SoapClient generates E_ERROR even if exceptions=1 is used
Submitted: 2015-09-10 13:50 UTC Modified: 2017-11-22 22:14 UTC
Votes:22
Avg. Score:4.2 ± 0.9
Reproduced:22 of 22 (100.0%)
Same Version:10 (45.5%)
Same OS:6 (27.3%)
From: Steve at bedezign dot com Assigned:
Status: Closed Package: SOAP related
PHP Version: 5.6.13 OS: Centos
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: Steve at bedezign dot com
New email:
PHP Version: OS:

 

 [2015-09-10 13:50 UTC] Steve at bedezign dot com
Description:
------------
On an input request error, the SoapClient calls trigger_error with an error level of E_ERROR (which is deemed fatal according to https://secure.php.net/manual/en/errorfunc.constants.php).

This also occurs with 'exceptions' enabled (so it does both trigger_error() and throws an exception. Since specifying faulty input for a soap call is definitely not a fatal error I think this is a bug. It causes weird behavior in Yii2 for example (see issue here: https://github.com/yiisoft/yii2/issues/9650

Test script:
---------------
Hard to do since we are talking about internal soap services here. I've added a screenshot of the issue here: 

https://cloud.githubusercontent.com/assets/231572/9788585/2c23c0f4-57cb-11e5-9624-b54e9a48dc4b.png

Expected result:
----------------
When "exception" == 1 I except trigger_error not to be called at all, and definitely not as a fatal error.

Actual result:
--------------
A call to trigger_error, causing issues in the fatal error handler of some libraries

Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-06-20 10:02 UTC] mail at cebe dot cc
An example script to reproduce the issue can be found here:

https://github.com/yiisoft/yii2/issues/11772#issuecomment-226991044
 [2017-11-04 14:28 UTC] ant dot artamonov at gmail dot com
Solved in PR: https://github.com/php/php-src/pull/2899
 [2017-11-22 22:15 UTC] nikic@php.net
-Summary: SoapClient generates E_ERROR +Summary: SoapClient generates E_ERROR even if exceptions=1 is used
 [2017-11-22 22:16 UTC] nikic@php.net
Automatic comment on behalf of a.artmnv@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=1dfcd1af9aab9b760d971ceeac18e9e83c85f80f
Log: Fixed bug #70469
 [2017-11-22 22:16 UTC] nikic@php.net
-Status: Open +Status: Closed
 [2017-12-22 16:51 UTC] nikic@php.net
Automatic comment on behalf of a.artmnv@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=024637378827ff03ccfb6b903c9d9b968d30af8d
Log: Fixed bug #70469
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 17:01:29 2024 UTC