Skip to content

Commit

Permalink
Update PageVersion.php
Browse files Browse the repository at this point in the history
  • Loading branch information
neil-jennings authored Jan 22, 2020
1 parent 89cea3a commit 1007890
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Models/PageVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static function add_new($page_id, $label = null)
$page_version->version_id = self::latest_version($page_id) + 1;
$page_version->template = !empty($page_id) ? Page::find($page_id)->template : 0;
$page_version->label = $label;
$page_version->preview_key = base_convert((rand(10, 99) . microtime(true)), 10, 36);
$page_version->preview_key = base_convert((int) (rand(10, 99) . microtime(true)), 10, 36);
$page_version->save();
return $page_version;
}
Expand Down Expand Up @@ -134,4 +134,4 @@ public function getName()
return $this->label ?: ('version ' . DateTimeHelper::display($this->created_at, 'short'));
}

}
}

0 comments on commit 1007890

Please sign in to comment.