diff --git a/.github/workflows/oci.yml b/.github/workflows/oci.yml
index 12bef5b1ed8e19aec2083b550325d7e801485b48..34d548c7f9fad2ce7a295afd89d2d769f292688c 100644
--- a/.github/workflows/oci.yml
+++ b/.github/workflows/oci.yml
@@ -50,6 +50,10 @@ jobs:
         working-directory: tests
         run: phpunit --configuration phpunit-autotest.xml --group DB,SLOWDB
 
+      - name: Run repair steps
+        run: |
+          ./occ maintenance:repair --include-expensive
+
   summary:
     permissions:
       contents: none
diff --git a/apps/dav/lib/Migration/RemoveObjectProperties.php b/apps/dav/lib/Migration/RemoveObjectProperties.php
index c72dfbebfea3cc95d3c9900439db412907bbf8a8..b771b70e6840499470267f358b45a72e3ac946dd 100644
--- a/apps/dav/lib/Migration/RemoveObjectProperties.php
+++ b/apps/dav/lib/Migration/RemoveObjectProperties.php
@@ -57,7 +57,7 @@ class RemoveObjectProperties implements IRepairStep {
 		$query = $this->connection->getQueryBuilder();
 		$updated = $query->delete('properties')
 			->where($query->expr()->in('propertyname', $query->createNamedParameter([self::RESOURCE_TYPE_PROPERTY, self::ME_CARD_PROPERTY, self::CALENDAR_TRANSP_PROPERTY], IQueryBuilder::PARAM_STR_ARRAY)))
-			->andWhere($query->expr()->eq('propertyvalue', $query->createNamedParameter('Object')))
+			->andWhere($query->expr()->eq('propertyvalue', $query->createNamedParameter('Object'), IQueryBuilder::PARAM_STR))
 			->executeStatement();
 
 		$output->info("$updated invalid object properties removed.");
diff --git a/core/Command/Maintenance/Repair.php b/core/Command/Maintenance/Repair.php
index 01e62f2cd3232b4b05ec729ad388644582d69822..a1d97476f9412b1783e1b97b65fa994d119c5802 100644
--- a/core/Command/Maintenance/Repair.php
+++ b/core/Command/Maintenance/Repair.php
@@ -53,6 +53,7 @@ class Repair extends Command {
 	private ProgressBar $progress;
 	private OutputInterface $output;
 	private IAppManager $appManager;
+	protected bool $errored = false;
 
 	public function __construct(\OC\Repair $repair, IConfig $config, IEventDispatcher $dispatcher, IAppManager $appManager) {
 		$this->repair = $repair;
@@ -104,6 +105,8 @@ class Repair extends Command {
 			}
 		}
 
+
+
 		$maintenanceMode = $this->config->getSystemValueBool('maintenance');
 		$this->config->setSystemValue('maintenance', true);
 
@@ -120,7 +123,7 @@ class Repair extends Command {
 		$this->repair->run();
 
 		$this->config->setSystemValue('maintenance', $maintenanceMode);
-		return 0;
+		return $this->errored ? 1 : 0;
 	}
 
 	public function handleRepairFeedBack(Event $event): void {
@@ -139,6 +142,7 @@ class Repair extends Command {
 			$this->output->writeln('<comment>     - WARNING: ' . $event->getMessage() . '</comment>');
 		} elseif ($event instanceof RepairErrorEvent) {
 			$this->output->writeln('<error>     - ERROR: ' . $event->getMessage() . '</error>');
+			$this->errored = true;
 		}
 	}
 }
diff --git a/lib/private/AppConfig.php b/lib/private/AppConfig.php
index 04e7637346661f998dd12d25e2d61c24ff92eeee..cd93c4f42c4f1138842a2e0e0756c104cd233de5 100644
--- a/lib/private/AppConfig.php
+++ b/lib/private/AppConfig.php
@@ -34,6 +34,7 @@ namespace OC;
 
 use OC\DB\Connection;
 use OC\DB\OracleConnection;
+use OCP\DB\QueryBuilder\IQueryBuilder;
 use OCP\IAppConfig;
 use OCP\IConfig;
 
@@ -298,7 +299,7 @@ class AppConfig implements IAppConfig {
 				$sql->andWhere(
 					$sql->expr()->orX(
 						$sql->expr()->isNull('configvalue'),
-						$sql->expr()->neq('configvalue', $sql->createNamedParameter($value))
+						$sql->expr()->neq('configvalue', $sql->createNamedParameter($value), IQueryBuilder::PARAM_STR)
 					)
 				);
 			}
diff --git a/lib/private/Repair/NC21/ValidatePhoneNumber.php b/lib/private/Repair/NC21/ValidatePhoneNumber.php
index f9c3c5952bf62fc6e55cb5cd30279072cd6b29d5..b3534dbeae8d473d33ea41c9d10c982298291f33 100644
--- a/lib/private/Repair/NC21/ValidatePhoneNumber.php
+++ b/lib/private/Repair/NC21/ValidatePhoneNumber.php
@@ -55,7 +55,8 @@ class ValidatePhoneNumber implements IRepairStep {
 
 	public function run(IOutput $output): void {
 		if ($this->config->getSystemValueString('default_phone_region', '') === '') {
-			throw new \Exception('Can not validate phone numbers without `default_phone_region` being set in the config file');
+			$output->warning('Can not validate phone numbers without `default_phone_region` being set in the config file');
+			return;
 		}
 
 		$numUpdated = 0;