Fix incorrect call to read/save version

This commit is contained in:
Aztech
2015-07-08 09:58:20 +02:00
committed by Thibaud Fabre
parent 5aad5e933e
commit c65fc6abec

View File

@@ -208,7 +208,7 @@ abstract class base implements cache_cacheableInterface
public function get_version() public function get_version()
{ {
if (! $this->version) { if (! $this->version) {
$this->version = $this->versionRepository->getVersion($this); $this->version = $this->versionRepository->getVersion();
} }
return $this->version; return $this->version;
@@ -217,7 +217,7 @@ abstract class base implements cache_cacheableInterface
protected function setVersion(PhraseaVersion $version) protected function setVersion(PhraseaVersion $version)
{ {
try { try {
return $this->versionRepository->saveVersion($this, $version); return $this->versionRepository->saveVersion($version);
} catch (\Exception $e) { } catch (\Exception $e) {
throw new Exception('Unable to set the database version : ' . $e->getMessage()); throw new Exception('Unable to set the database version : ' . $e->getMessage());
} }