Fix compatibility with PHP 5.4
Fixes https://github.com/owncloud/core/issues/22960
This commit is contained in:
parent
15833d9843
commit
d14adb2351
|
@ -265,7 +265,8 @@ class Google extends \OC\Files\Storage\Common {
|
||||||
foreach ($children->getItems() as $child) {
|
foreach ($children->getItems() as $child) {
|
||||||
$name = $child->getTitle();
|
$name = $child->getTitle();
|
||||||
// Check if this is a Google Doc i.e. no extension in name
|
// 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
|
&& $child->getMimeType() !== self::FOLDER
|
||||||
) {
|
) {
|
||||||
$name .= '.'.$this->getGoogleDocExtension($child->getMimeType());
|
$name .= '.'.$this->getGoogleDocExtension($child->getMimeType());
|
||||||
|
|
Loading…
Reference in New Issue