Skip to content

Commit

Permalink
Dibi\DateTime::__wakeup() doesn't call parent after 8e8e6df [Closes d…
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Jul 27, 2016
1 parent c019e7c commit 3e20a6b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/Dibi/DateTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,14 @@ public function __toString()

public function __wakeup()
{
if (isset($this->fix)) {
if (isset($this->fix[1])) {
$this->__construct($this->fix[0], new \DateTimeZone($this->fix[1]));
} else {
$this->__construct($this->fix[0]);
}
if (isset($this->fix, $this->fix[1])) {
$this->__construct($this->fix[0], new \DateTimeZone($this->fix[1]));
unset($this->fix);
} elseif (isset($this->fix)) {
$this->__construct($this->fix[0]);
unset($this->fix);
} else {
parent::__wakeup();
}
}

Expand Down

0 comments on commit 3e20a6b

Please sign in to comment.