This commit is contained in:
salam committed 2026-02-06 17:33:33 +01:00
1 parent 5f0fe9c010
commit 8416646f74
1 file changed
+10 -6
@@ -30,9 +30,11 @@ class TxoddsFlags
$data = Xml::load($url);
foreach ($data as $row) {
foreach ($tables as $table) {
DB::table($table)->where('offer_id', (int) $row['id'])->update(['last_updated' => $row['last_updated'], 'flags' => $row['flags']]);
if (is_array($data)) {
foreach ($data as $row) {
foreach ($tables as $table) {
DB::table($table)->where('offer_id', (int) $row['id'])->update(['last_updated' => $row['last_updated'], 'flags' => $row['flags']]);
}
}
}
@@ -47,9 +49,11 @@ class TxoddsFlags
Supervisor::where('id', Nuh::$options['supervisor_id'])->update(['lastcall' => (int) $data['timestamp']]);
foreach ($data as $row) {
foreach ($tables as $table) {
DB::table($table)->where('offer_id', (int) $row['id'])->update(['last_updated' => $row['last_updated'], 'flags' => $row['flags']]);
if (is_array($data)) {
foreach ($data as $row) {
foreach ($tables as $table) {
DB::table($table)->where('offer_id', (int) $row['id'])->update(['last_updated' => $row['last_updated'], 'flags' => $row['flags']]);
}
}
}
}