diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-01-17 11:46:30 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-01-18 13:40:55 +0100 |
commit | 3d4c698f448925aca62976175ffd4bab9694c7d6 (patch) | |
tree | 6ab0f4840ef17e67cc97426cc323b46dc31f80c0 /lib/private/Preview | |
parent | c121610d5a42b8a30a328c0a2f9704fb20d4c369 (diff) | |
download | nextcloud-server-3d4c698f448925aca62976175ffd4bab9694c7d6.tar.gz nextcloud-server-3d4c698f448925aca62976175ffd4bab9694c7d6.zip |
Improve OC_Image code to not guess the type of input, but actually request the specific methods to be called
Followup to #7836
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/Preview')
-rw-r--r-- | lib/private/Preview/TXT.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/Preview/TXT.php b/lib/private/Preview/TXT.php index a4b7ec769c0..88c6e87f38e 100644 --- a/lib/private/Preview/TXT.php +++ b/lib/private/Preview/TXT.php @@ -91,8 +91,9 @@ class TXT extends Provider { } } - $image = new \OC_Image($image); + $imageObject = new \OC_Image(); + $imageObject->setResource($image); - return $image->valid() ? $image : false; + return $imageObject->valid() ? $imageObject : false; } } |