php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72009 Error Operator Control not working properly
Submitted: 2016-04-12 09:24 UTC Modified: 2016-04-12 09:34 UTC
From: mellonedain at gmail dot com Assigned:
Status: Closed Package: Output Control
PHP Version: 7.0.5 OS: Any
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: mellonedain at gmail dot com
New email:
PHP Version: OS:

 

 [2016-04-12 09:24 UTC] mellonedain at gmail dot com
Description:
------------
Error Control Operator not working properly when we want to handle some errors in own code. Instead of it we must use some hack described here: http://stackoverflow.com/questions/19116320/suppress-stream-socket-client-warnings


Test script:
---------------
$resource = @stream_socket_client($uri, $errno, $errstr, (float) $timeout, $flags);

if (!$resource) {
    $this->onConnectionError(trim($errstr), $errno);
}

Expected result:
----------------
Warning: stream_socket_client(): unable to connect to tcp://localhost:6379 (Connection refused) in ../file.php on line 94

Actual result:
--------------
Nothing

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-04-12 09:26 UTC] mellonedain at gmail dot com
In description I do some mistake. Should be:

Expected result:
----------------
Nothing

Actual result:
--------------
Warning: stream_socket_client(): unable to connect to tcp://localhost:6379 (Connection refused) in ../file.php on line 94
 [2016-04-12 09:34 UTC] mellonedain at gmail dot com
-Status: Open +Status: Closed
 [2016-04-12 09:34 UTC] mellonedain at gmail dot com
This is unfortunately problem with xdebug option xdebug.force_error_reporting. Sorry for the inconvenience.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC