Skip to content

Commit

Permalink
Merge pull request #9129 from Elgg/1.10
Browse files Browse the repository at this point in the history
Merge 1.10 to 1.11
  • Loading branch information
juho-jaakkola committed Nov 22, 2015
2 parents 58a65a0 + 2334277 commit 7d79677
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions engine/classes/ElggFile.php
Expand Up @@ -446,4 +446,30 @@ public function save() {

return true;
}

/**
* Get property names to serialize.
*
* @return string[]
*/
public function __sleep() {
return array_diff(array_keys(get_object_vars($this)), array(
// Don't persist filestore, which contains CONFIG
// https://github.com/Elgg/Elgg/issues/9081#issuecomment-152859856
'filestore',

// a resource
'handle',
));
}

/**
* Reestablish filestore property
*
* @return void
* @throws ClassNotFoundException
*/
public function __wakeup() {
$this->getFilestore();
}
}

0 comments on commit 7d79677

Please sign in to comment.