aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2016-03-08 18:04:24 +0100
committerLukas Reschke <lukas@owncloud.com>2016-03-08 18:04:24 +0100
commitd14adb2351911030bd9eff4311493dd63826c5ee (patch)
tree73d837cd2f7d6b47f9086395084dd869d6c379b8
parent15833d9843c3ff7c0cb51b95f8610bddb044472d (diff)
downloadnextcloud-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.php3
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());