Page 1 of 1

ERROR:Call to a member function isWritable() on a non-object

Posted: Tue Oct 23, 2012 5:59 pm
by Eric
Hello,

I tried to install the GO Version: 4.0.113 on an all-inkl.com webspace and got the error:

Call to a member function isWritable() on a non-object in /pathxxxxx/group-office/modules/files/model/Folder.php on line 218

that is the Code:

//check permissions on the filesystem
if($this->isNew){
if(!$this->parent->fsFolder->isWritable()){
throw new Exception("Folder ".$this->parent->path." is read only on the filesystem. Please check the file system permissions (hint: chmod -R www-data:www-data /home/groupoffice)");
}
}else
{
if($this->isModified('name') || $this->isModified('parent_id')){
if(!$this->_getOldFsFolder()->isWritable())
throw new Exception("Folder ".$this->path." is read only on the filesystem. Please check the file system permissions (hint: chmod -R www-data:www-data /home/groupoffice)");
}
}

if(!$this->systemSave && !$this->isNew && $this->readonly){
if($this->isModified('name') || $this->isModified('folder_id'))
return false;
}

if($this->parent){
$existingFolder = $this->parent->hasFolder($this->name);
if($existingFolder && $existingFolder->id!=$this->id)
throw new Exception(GO::t('folderExists','files').': '.$this->path);
}

return parent::beforeSave();

I tried some things and called the support, but without result. After hours I deleted the code and now is all working!

So my questions are:
1) what does the code do, in which part of the GO it is needed?
2) could this code be altered so that the error is solved and the code is further available?

Kind regards

Re: ERROR:Call to a member function isWritable() on a non-ob

Posted: Tue Nov 06, 2012 6:35 pm
by mschering
This bug has been fixed in the latest version.