[Dxspider-support] Argument " " isn't numeric in int at /spider/perl/DXUtil.pm line 644

Keith, G6NHU g6nhu at me.com
Thu Apr 10 08:55:47 BST 2025


Thank you Fabian, hopefully Dirk will see this and implement the fix.

73 Keith.
On 9 Apr 2025 at 10:49 +0100, Fabian Kurz via Dxspider-support <dxspider-support at tobit.co.uk>, wrote:
> On Wed, Apr 09, 2025 at 09:06:28AM +0100, Keith, G6NHU via Dxspider-support wrote:
> > Sorry, Dirk, your attempted fix didn’t work.
> >
> > 07:50:01 (*) Argument " " isn't numeric in int at /spider/perl/DXUtil.pm line 645.
> > 07:50:01 (*)  at /spider/perl/DXUtil.pm line 645.
>
> This comes from spider/cmd/show/cluster.pl line 11 where the uptime is calculated:
>
> $uptime = difft($main::starttime, ' ');
>
> The function difft() could be changed in the following way to make
> this warning disappear:
>
> diff --git a/perl/DXUtil.pm b/perl/DXUtil.pm
> index e88f93ec..9a3b7d0e 100644
> --- a/perl/DXUtil.pm
> +++ b/perl/DXUtil.pm
> @@ -642,7 +642,7 @@ sub difft
> $t -= $h * 3600;
> $m = int $t / 60;
> $out .= sprintf ("%s${m}m", $adds?' ':'') if $m;
> - if (($d == 0 && $adds) || (int $adds && $adds == 2)) {
> + if (($d == 0 && $adds) || ($adds =~ /^\d+$/ && $adds == 2)) {
> $s = int $t % 60;
> $out .= sprintf ("%s${s}s", $adds?' ':'') if $s;
> $out ||= sprintf ("%s0s", $adds?' ':'');
>
> I just deployed this on DA0BCC-7 and there are no more warnings in the log.
>
> 73
> Fabian, DJ5CW
> --
> Fabian Kurz Munich, Germany
> fabian at fkurz.net +49(174)6926713
> https://fkurz.net/ DJ5CW / SO5CW
>
> _______________________________________________
> Dxspider-support mailing list
> Dxspider-support at tobit.co.uk
> https://mailman.tobit.co.uk/mailman/listinfo/dxspider-support
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.tobit.co.uk/pipermail/dxspider-support/attachments/20250410/a25a0715/attachment.htm>


More information about the Dxspider-support mailing list