diff options
author | Lukas Reschke <lukas@owncloud.com> | 2016-03-08 18:04:24 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2016-03-08 18:04:24 +0100 |
commit | d14adb2351911030bd9eff4311493dd63826c5ee (patch) | |
tree | 73d837cd2f7d6b47f9086395084dd869d6c379b8 | |
parent | 15833d9843c3ff7c0cb51b95f8610bddb044472d (diff) | |
download | nextcloud-server-d14adb2351911030bd9eff4311493dd63826c5ee.tar.gz nextcloud-server-d14adb2351911030bd9eff4311493dd63826c5ee.zip |
Fix compatibility with PHP 5.4
Fixes https://github.com/owncloud/core/issues/22960
-rw-r--r-- | apps/files_external/lib/google.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php index 3e8b60d33df..5e5716cf438 100644 --- a/apps/files_external/lib/google.php +++ b/apps/files_external/lib/google.php @@ -265,7 +265,8 @@ class Google extends \OC\Files\Storage\Common { foreach ($children->getItems() as $child) { $name = $child->getTitle(); // Check if this is a Google Doc i.e. no extension in name - if (empty($child->getFileExtension()) + $extension = $child->getFileExtension(); + if (empty($extension) && $child->getMimeType() !== self::FOLDER ) { $name .= '.'.$this->getGoogleDocExtension($child->getMimeType()); |