[Pkg-owncloud-commits] [owncloud] 98/258: make sure preview prop is instanceof OC_Image before using it in showPreview

David Prévot taffit at moszumanska.debian.org
Sat Oct 11 17:22:25 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 2068eaf16b7a7722fb13093ce09f6663f160bd6f
Author: Georg Ehrke <developer at georgehrke.com>
Date:   Sun Sep 21 17:30:29 2014 +0200

    make sure preview prop is instanceof OC_Image before using it in showPreview
---
 lib/private/preview.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/private/preview.php b/lib/private/preview.php
index 6172519..9006a2e 100755
--- a/lib/private/preview.php
+++ b/lib/private/preview.php
@@ -537,7 +537,9 @@ class Preview {
 		if (is_null($this->preview)) {
 			$this->getPreview();
 		}
-		$this->preview->show($mimeType);
+		if ($this->preview instanceof \OC_Image) {
+			$this->preview->show($mimeType);
+		}
 	}
 
 	/**

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list