Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit ce8a759

Browse files
author
Michael Grauer
committed
BUG: refs #380 Explicit string cast for pgsql, passing assetstore id to settings
1 parent c4b31a3 commit ce8a759

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/models/base/AssetstoreModelBase.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,12 @@ public function getDefault()
180180
}
181181
}
182182
$defaultAssetstore = $found[0];
183-
$settingModel->setConfig('default_assetstore', $defaultAssetstore->getKey());
183+
// explicit cast to string, as the setConfig method expects a string
184+
$defaultAssetstoreId = (string)$defaultAssetstore->getKey();
185+
$settingModel->setConfig('default_assetstore', $defaultAssetstoreId);
184186
}
185187

186188
return $defaultAssetstore;
187189
} // end getDefault
188190

189-
} // end class AssetstoreModelBase
191+
} // end class AssetstoreModelBase

0 commit comments

Comments
 (0)