Skip to content

Commit 18813c2

Browse files
iu2frlphl0
andauthored
Apply suggestions from code review
Co-authored-by: Florian (DF2ET) <github@florian-wolters.de>
1 parent dfe682b commit 18813c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

application/libraries/Callbook.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function getCallbookData($callsign) {
2626
// Parse each callbook in the array until we get a valid result
2727
foreach ($source_callbooks as $source) {
2828
$callbook = $this->queryCallbook($callsign, $source);
29-
if (!isset($callbook['error'])) {
29+
if (!isset($callbook['error']) || $callbook['error'] == '') {
3030
break;
3131
}
3232
}
@@ -80,7 +80,7 @@ function queryCallbook($callsign, $source) {
8080
$callbook['error'] = 'No callbook defined. Please review configuration.';
8181
}
8282

83-
log_message('debug', 'Callbook lookup for '.$callsign.' using '.$source.': '.(isset($callbook['error']) ? $callbook['error'] : 'Success'));
83+
log_message('debug', 'Callbook lookup for '.$callsign.' using '.$source.': '.((($callbook['error'] ?? '' ) != '') ? $callbook['error'] : 'Success'));
8484
return $callbook;
8585
}
8686

0 commit comments

Comments
 (0)