summaryrefslogtreecommitdiffstats
path: root/lib/private/image.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/image.php')
-rw-r--r--lib/private/image.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/image.php b/lib/private/image.php
index 317b6fde160..2484aeecc63 100644
--- a/lib/private/image.php
+++ b/lib/private/image.php
@@ -283,9 +283,12 @@ class OC_Image {
}
/**
- * @return string Returns the raw image data.
+ * @return null|string Returns the raw image data.
*/
function data() {
+ if (!$this->valid()) {
+ return null;
+ }
ob_start();
switch ($this->mimeType) {
case "image/png":