diff --git a/classes/db/migrations.php b/classes/db/migrations.php
index 6e20ddf7f460bd38c5d6e038b528bb3d7a5e0ab3..aecd9186cb3499025bf1168453b4faed40d2ed9c 100644
--- a/classes/db/migrations.php
+++ b/classes/db/migrations.php
@@ -21,10 +21,10 @@ class Db_Migrations {
 	private $pdo;
 
 	/** @var int */
-	private $cached_version;
+	private $cached_version = 0;
 
 	/** @var int */
-	private $cached_max_version;
+	private $cached_max_version = 0;
 
 	/** @var int */
 	private $max_version_override;
@@ -65,7 +65,7 @@ class Db_Migrations {
 	}
 
 	function get_version() : int {
-		if (isset($this->cached_version))
+		if ($this->cached_version)
 			return $this->cached_version;
 
 		try {
@@ -152,7 +152,7 @@ class Db_Migrations {
 		if ($this->max_version_override > 0)
 			return $this->max_version_override;
 
-		if (isset($this->cached_max_version))
+		if ($this->cached_max_version)
 			return $this->cached_max_version;
 
 		$migrations = glob("{$this->migrations_path}/*.sql");