php8 warnings

This commit is contained in:
nobody 2022-03-11 21:17:09 -08:00
parent f729b9be8a
commit fefa91bfba
3 changed files with 5 additions and 6 deletions

View file

@ -613,7 +613,7 @@ class Activity
$ret = [];
if (is_array($item['attachment']) && $item['attachment']) {
if (isset($item['attachment']) && is_array($item['attachment']) && $item['attachment']) {
$ptr = $item['attachment'];
if (!array_key_exists(0, $ptr)) {
$ptr = [$ptr];
@ -667,7 +667,7 @@ class Activity
$ret[] = $entry;
}
}
} elseif (is_string($item['attachment'])) {
} elseif (isset($item['attachment']) && is_string($item['attachment'])) {
btlogger('not an array: ' . $item['attachment']);
}

View file

@ -1466,7 +1466,7 @@ class Libzot
}
}
}
if ($AS->data['hubloc']) {
if (isset($AS->data['hubloc']) && $AS->data['hubloc']) {
$arr['item_verified'] = true;
if (!array_key_exists('comment_policy', $arr)) {
@ -2094,7 +2094,7 @@ class Libzot
$last_hop = '';
}
$current_route = (($arr['route']) ? $arr['route'] . ',' : '') . $sender;
$current_route = ((isset($arr['route']) && $arr['route']) ? $arr['route'] . ',' : '') . $sender;
if ($last_hop && $last_hop != $sender) {
logger('comment route mismatch: parent route = ' . $r[0]['route'] . ' expected = ' . $current_route, LOGGER_DEBUG);

View file

@ -1,5 +1,4 @@
<?php
<?php
namespace Code\Module;