Fix some ErrorExceptions (#14241)

* Fix some ErrorExceptions

* Use Config::get default value

Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
Jellyfrog
2022-08-25 10:03:06 +02:00
committed by GitHub
parent a0b8b09f97
commit 835eac1233
5 changed files with 8 additions and 6 deletions

View File

@@ -1268,7 +1268,7 @@ function cache_peeringdb()
$json_data = $get->body();
$data = json_decode($json_data);
$ixs = $data->{'data'}[0]->{'netixlan_set'};
foreach ($ixs as $ix) {
foreach ($ixs ?? [] as $ix) {
$ixid = $ix->{'ix_id'};
$tmp_ix = dbFetchRow('SELECT * FROM `pdb_ix` WHERE `ix_id` = ? AND asn = ?', [$ixid, $asn]);
if ($tmp_ix) {