Skip to content

Commit

Permalink
try to avoid passing NULL to file_put_contents()
Browse files Browse the repository at this point in the history
passing IncomingMailAttachment::$filePath access through IncomingMailAttachment::__get() appears to ensure NULL does not get passed to file_put_contents();
  • Loading branch information
bapcltd-marv committed Jan 29, 2020
1 parent fc6f1da commit 0e668fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PhpImap/IncomingMailAttachment.php
Expand Up @@ -115,7 +115,7 @@ public function saveToDisk() : bool
return false;
}

if (false === file_put_contents($this->filePath, $this->dataInfo->fetch())) {
if (false === file_put_contents($this->__get('filePath'), $this->dataInfo->fetch())) {
unset($this->filePath, $this->file_path);

return false;
Expand Down

0 comments on commit 0e668fe

Please sign in to comment.