Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Read bytes from MongoGridFSFile unless GridFSFile is dirty

  • Loading branch information...
commit 7f81f21ece131ef69667528c6cdf76662c3681fd 1 parent 595bd3a
@jmikola jmikola authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/Doctrine/MongoDB/GridFSFile.php
View
2  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) {
Please sign in to comment.
Something went wrong with that request. Please try again.