Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the logger level in setStream and getStream functions to prevent excessive log errors #9609

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/Imap/ImapHandler.php
Expand Up @@ -107,7 +107,7 @@ public function __construct($logErrors = true, $logCalls = true, $charset = null
protected function setStream($stream, $validate = true)
{
if ($validate && !is_resource($stream)) {
$this->logger->error('ImapHandler trying to set a non valid resource az stream.');
$this->logger->warn('ImapHandler trying to set a non valid resource az stream.');
}
$this->stream = $stream;
}
Expand All @@ -120,7 +120,7 @@ protected function setStream($stream, $validate = true)
protected function getStream($validate = true)
{
if ($validate && !is_resource($this->stream)) {
$this->logger->error('ImapHandler trying to use a non valid resource stream.');
$this->logger->warn('ImapHandler trying to use a non valid resource stream.');
}

return $this->stream;
Expand Down