From 178af37a7c899d7e65c2368419480cbde195d422 Mon Sep 17 00:00:00 2001 From: ghost Date: Thu, 14 Sep 2023 03:49:30 +0300 Subject: [PATCH] convert arrays to objects --- src/crontab/export/feed.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/crontab/export/feed.php b/src/crontab/export/feed.php index 8682efb..5a9d6f2 100644 --- a/src/crontab/export/feed.php +++ b/src/crontab/export/feed.php @@ -196,7 +196,10 @@ try { if ($infoHash = $db->getInfoHash($result->infoHashId)) { - $xt[$infoHash->version] = $infoHash->value; + $xt[] = (object) [ + 'version' => $infoHash->version, + 'value' => $infoHash->value, + ]; } } @@ -299,11 +302,11 @@ try 'timeUpdated' => $magnet->timeUpdated, 'dn' => $magnet->dn, 'xl' => $magnet->xl, - 'xt' => (array) $xt, - 'kt' => (array) $kt, - 'tr' => (array) $tr, - 'as' => (array) $as, - 'xs' => (array) $xs, + 'xt' => (object) $xt, + 'kt' => (object) $kt, + 'tr' => (object) $tr, + 'as' => (object) $as, + 'xs' => (object) $xs, ]; }