summaryrefslogtreecommitdiffstats
path: root/lib/image.php
diff options
context:
space:
mode:
authorkondou <kondou@ts.unde.re>2013-09-01 15:50:58 +0200
committerkondou <kondou@ts.unde.re>2013-09-01 15:50:58 +0200
commit2d6a400381ffe9d13047ecf7273c550f335e5225 (patch)
tree4cbd7974c064a3ac6269404bf6afcca911b8d08b /lib/image.php
parent235638e5abd35f2f19944bbe0b5a838b83465252 (diff)
downloadnextcloud-server-2d6a400381ffe9d13047ecf7273c550f335e5225.tar.gz
nextcloud-server-2d6a400381ffe9d13047ecf7273c550f335e5225.zip
Check for $this->fileInfo and @depend on testData()
Diffstat (limited to 'lib/image.php')
-rw-r--r--lib/image.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/image.php b/lib/image.php
index badc30ab9a0..7761a3c7737 100644
--- a/lib/image.php
+++ b/lib/image.php
@@ -519,7 +519,7 @@ class OC_Image {
return false;
}
$this->resource = @imagecreatefromstring($str);
- if (\OC_Util::fileInfoLoaded()) {
+ if ($this->fileInfo) {
$this->mimeType = $this->fileInfo->buffer($str);
}
if(is_resource($this->resource)) {
@@ -546,7 +546,7 @@ class OC_Image {
$data = base64_decode($str);
if($data) { // try to load from string data
$this->resource = @imagecreatefromstring($data);
- if (\OC_Util::fileInfoLoaded()) {
+ if ($this->fileInfo) {
$this->mimeType = $this->fileInfo->buffer($data);
}
if(!$this->resource) {