Skip to content

Commit

Permalink
Fixing error introduced in refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Nov 12, 2015
1 parent 6981569 commit 81428a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/LockableTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ public function unlock()
public function isLocked()
{
$now = time();
$locked = $this->get('locked_time')->format('U');
$locked = $this->get('locked_time');
$locked = $locked ? $locked->format('U') : 0;

return $locked && abs($now - $locked) < static::getLockTimeout();
}
Expand Down

0 comments on commit 81428a9

Please sign in to comment.