summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2014-09-21 22:44:07 +0200
committerMorris Jobke <hey@morrisjobke.de>2014-09-21 22:44:07 +0200
commitb622fa502ef516384e5bc23df2ca19315cb0455b (patch)
tree65b650ec03fef45a94614541bc534aabfcfb0ca1
parent69726d951e805e8692907c99b24edbc3099b29d4 (diff)
parent071e4bfc06e2cbeac831d79e3d59337fbc73597d (diff)
downloadnextcloud-server-b622fa502ef516384e5bc23df2ca19315cb0455b.tar.gz
nextcloud-server-b622fa502ef516384e5bc23df2ca19315cb0455b.zip
Merge pull request #11200 from owncloud/preview_better_errorhandling
make sure preview prop is instanceof OC_Image before using it in showPreview
-rwxr-xr-xlib/private/preview.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/preview.php b/lib/private/preview.php
index 292a8d481fd..b04cc2b8564 100755
--- a/lib/private/preview.php
+++ b/lib/private/preview.php
@@ -548,7 +548,9 @@ class Preview {
if (is_null($this->preview)) {
$this->getPreview();
}
- $this->preview->show($mimeType);
+ if ($this->preview instanceof \OC_Image) {
+ $this->preview->show($mimeType);
+ }
}
/**