Skip to content
This repository has been archived by the owner on Nov 11, 2020. It is now read-only.

Commit

Permalink
Read bytes from MongoGridFSFile unless GridFSFile is dirty
Browse files Browse the repository at this point in the history
  • Loading branch information
jmikola committed Dec 5, 2012
1 parent 595bd3a commit 7f81f21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Doctrine/MongoDB/GridFSFile.php
Expand Up @@ -144,7 +144,7 @@ public function getBytes()
if ($this->isDirty && $this->bytes) {
return $this->bytes;
}
if ($this->filename) {
if ($this->isDirty && $this->filename) {
return file_get_contents($this->filename);
}
if ($this->mongoGridFSFile instanceof \MongoGridFSFile) {
Expand Down

0 comments on commit 7f81f21

Please sign in to comment.