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 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:
MUST BE VALID
Solve the problem:
41 + 20 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 17:01:29 2024 UTC