From 61582fa4da9bd889491f789f7831313d0e50db02 Mon Sep 17 00:00:00 2001 From: Deon George Date: Mon, 4 Sep 2023 12:10:51 +1200 Subject: [PATCH] Fix for when we have a duplicate FTN and we are logging that - Attempt to read property ftn on string --- app/Classes/Node.php | 2 +- app/Classes/Protocol/Binkp.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Classes/Node.php b/app/Classes/Node.php index ebf3ccf..7829fb7 100644 --- a/app/Classes/Node.php +++ b/app/Classes/Node.php @@ -144,7 +144,7 @@ class Node case 'ftn_other': // Ignore any duplicate FTNs that we get if ($this->ftns_other->search($value) !== FALSE) { - Log::debug(sprintf('%s: - Ignoring Duplicate FTN [%s]',__METHOD__,$value->ftn)); + Log::debug(sprintf('%s: - Ignoring Duplicate FTN [%s]',__METHOD__,$value)); break; } diff --git a/app/Classes/Protocol/Binkp.php b/app/Classes/Protocol/Binkp.php index b11d102..ffcdcdb 100644 --- a/app/Classes/Protocol/Binkp.php +++ b/app/Classes/Protocol/Binkp.php @@ -691,7 +691,7 @@ final class Binkp extends BaseProtocol $this->node->ftn_other = $rem_aka; continue; - } else if (! $o->active) { + } elseif (! $o->active) { Log::alert(sprintf('%s:/ AKA is not active [%s], ignoring',self::LOGKEY,$rem_aka)); continue; @@ -700,7 +700,7 @@ final class Binkp extends BaseProtocol } } catch (\Exception $e) { - Log::error(sprintf('%s:! AKA is INVALID [%s] (%s)',self::LOGKEY,$rem_aka,$e->getMessage())); + Log::error(sprintf('%s:! AKA is INVALID [%s] (%d:%s-%s)',self::LOGKEY,$rem_aka,$e->getLine(),$e->getFile(),$e->getMessage())); $this->msgs(self::BPM_ERR,sprintf('Bad address %s',$rem_aka)); $this->rc = self::S_FAILURE;