Merge pull request #22961 from owncloud/fix-gdrive-on-php54

Fix compatibility with PHP 5.4
This commit is contained in:
Thomas Müller 2016-03-09 12:20:42 +01:00
commit 447e8d2313

View file

@ -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());