Permalink
Browse files

Read bytes from MongoGridFSFile unless GridFSFile is dirty

  • Loading branch information...
1 parent 595bd3a commit 7f81f21ece131ef69667528c6cdf76662c3681fd @jmikola jmikola committed Nov 30, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Doctrine/MongoDB/GridFSFile.php
@@ -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) {

0 comments on commit 7f81f21

Please sign in to comment.