Fixed global media files disappearing after a reload (#1545)

This commit is contained in:
Matias Griese
2017-06-28 11:50:39 +03:00
parent 90182e2ceb
commit e9c11bbef2
2 changed files with 16 additions and 3 deletions

View File

@@ -1,3 +1,9 @@
# v1.3.0-rc.5
## mm/dd/2017
1. [](#bugfix)
* Fixed global media files disappearing after a reload (#1545)
# v1.3.0-rc.4
## 06/22/2017

View File

@@ -30,12 +30,19 @@ class Media extends AbstractMedia
{
$this->path = $path;
$this->__wakeup();
$this->init();
}
/**
* Initialize static variables on unserialize.
*/
public function __wakeup()
{
if (!isset(static::$global)) {
// Add fallback to global media.
static::$global = new GlobalMedia($path);
static::$global = new GlobalMedia();
}
$this->init();
}
/**