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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2020 The PHP Group
All rights reserved.
Last updated: Sun Mar 29 13:01:26 2020 UTC