Skip to content

Commit

Permalink
[HttpKernel] Prevent errors leaking out in the console on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed May 2, 2011
1 parent fc3be8a commit d05c592
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -45,9 +45,9 @@ public function testConstruct()
*/
public function testHandleWithoutLogger($event, $event2)
{
//store the current error_log, and set the new one to dev/null
$error_log = ini_get('error_log');
ini_set('error_log', '/dev/null');
//store the current log_errors, and disable it temporarily
$logErrors = ini_get('log_errors');
ini_set('log_errors', 'Off');

$l = new ExceptionListener('foo');
$l->onCoreException($event);
Expand All @@ -60,8 +60,8 @@ public function testHandleWithoutLogger($event, $event2)
$this->assertSame('foo', $e->getMessage());
}

//restore the old error_log
ini_set('error_log', $error_log);
//restore the old log_errors setting
ini_set('log_errors', $logErrors);
}

/**
Expand Down

0 comments on commit d05c592

Please sign in to comment.