Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update Mailbox.php
  • Loading branch information
Victor Isadov authored Aug 22, 2017
commit d2a42221f5e359e557476561c9bffea68ad1f9e7
4 changes: 2 additions & 2 deletions src/PhpImap/Mailbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ public function getImapStream($forceConnection = true) {
* @param string $imapPath
*/
public function switchMailbox($imapPath = '') {
$this->imapPath = $imapPath;
$imapStream = @imap_reopen($this->getImapStream(), $imapPath);
$this->setImapPath($imapPath);
$imapStream = @imap_reopen($this->getImapStream(), $this->imapPath);
if(!$imapStream) {
throw new Exception("Couldn't switch mailbox: " . imap_last_error());
}
Expand Down