Skip to content
Snippets Groups Projects
Commit b67c445c authored by Jared Hancock's avatar Jared Hancock
Browse files

oops: Fix upgrade crashes

parent 26f70696
Branches
Tags
No related merge requests found
...@@ -1453,7 +1453,7 @@ implements IteratorAggregate, Countable, ArrayAccess { ...@@ -1453,7 +1453,7 @@ implements IteratorAggregate, Countable, ArrayAccess {
function asArray() { function asArray() {
$this->fillTo(PHP_INT_MAX); $this->fillTo(PHP_INT_MAX);
return $this; return $this->getCache();
} }
function getCache() { function getCache() {
......
...@@ -1033,7 +1033,7 @@ class CustomDataTranslation extends VerySimpleModel { ...@@ -1033,7 +1033,7 @@ class CustomDataTranslation extends VerySimpleModel {
$criteria['lang'] = $lang; $criteria['lang'] = $lang;
try { try {
return static::objects()->filter($criteria)->all(); return static::objects()->filter($criteria)->all()->asArray();
} }
catch (OrmException $e) { catch (OrmException $e) {
// Translation table might not exist yet — happens on the upgrader // Translation table might not exist yet — happens on the upgrader
......
...@@ -28,7 +28,7 @@ class TaskLoader extends MigrationTask { ...@@ -28,7 +28,7 @@ class TaskLoader extends MigrationTask {
foreach ($sequences as $s) { foreach ($sequences as $s) {
if ($s['id'] != 2) continue; if ($s['id'] != 2) continue;
unset($s['id']); unset($s['id']);
$sq=Sequence::create($s); $sq=new Sequence($s);
$sq->save(); $sq->save();
$sql= 'INSERT INTO '.CONFIG_TABLE $sql= 'INSERT INTO '.CONFIG_TABLE
.' (`namespace`, `key`, `value`) ' .' (`namespace`, `key`, `value`) '
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment