Gossamer Forum
Home : Products : Others : Gossamer Community :

Argument "" isn't numeric in numeric gt (>)

Quote Reply
Argument "" isn't numeric in numeric gt (>)
I use Beta 3 and I have A LOT of these lines in my apache error log:

Argument "" isn't numeric in numeric gt (>) at /path/to/community/private/lib/Community.pm line 65.

A fix?
Thanks
Max
The one with Mac OS X Server 10.4 :)
Quote Reply
Re: [maxpico] Argument "" isn't numeric in numeric gt (>) In reply to
Can someone reply please?
GT? Crazy
Max
The one with Mac OS X Server 10.4 :)
Quote Reply
Re: [maxpico] Argument "" isn't numeric in numeric gt (>) In reply to
It's moths that my error log is growing plenty of this line!
Can someone reply please?
GT? Mad
Max
The one with Mac OS X Server 10.4 :)
Quote Reply
Re: [maxpico] Argument "" isn't numeric in numeric gt (>) In reply to
Hi Max,

Community.pm line 65:
Code:
comm_debug("Gossamer Community initialized") if ($CFG->{debug} > 1);

My guess is that $CFG->{debug} is set to '' instead of '0'. Go to Setup -> Misc Options and change it to 0 instead of blank.

I just downloaded Community and it said nothing about beta 3. If your line #65 is different, please post it for me to peek at.

~Charlie
Quote Reply
Re: [Chaz] Argument "" isn't numeric in numeric gt (>) In reply to
Thanks Chaz. In fact, I realized that a little after my third post here. However it is a bug...
Max
The one with Mac OS X Server 10.4 :)
Quote Reply
Re: [maxpico] Argument "" isn't numeric in numeric gt (>) In reply to
Did that actually fix your problem? I still don't see that error in my logs. I also tried adding the -w flag to see if it'll show up.

~Charlie
Quote Reply
Re: [Chaz] Argument "" isn't numeric in numeric gt (>) In reply to
Quote:
My guess is that $CFG->{debug} is set to '' instead of '0'. Go to Setup -> Misc Options and change it to 0 instead of blank.

If this is the case, then maybe GT should set this to 0 by default? I know there is a similar problem in LSQL, whereas debug info is written to the log files, when it shouldn't be Frown

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Argument "" isn't numeric in numeric gt (>) In reply to
I tried it with both 0 and a blank value but I wasn't able to reproduce the error. That is why I was wondering if that solved his problem. Even if debug key didn't exist, would it not autovivify to a undef value for use in the comparison? Hmm, even if that were the case, you would still be using undef for numerical comparison.

What version of Perl is giving you this error?

~Charlie
Quote Reply
Re: [Chaz] Argument "" isn't numeric in numeric gt (>) In reply to
>>>What version of Perl is giving you this error? <<<

5.6.1

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Chaz] Argument "" isn't numeric in numeric gt (>) In reply to
Here are some scenarios with perl 5.6.1:

perl -we "print undef > 1;"
Warning:
Use of uninitialized value in numeric gt (<>)

perl -we "print '' > 1;"
Warning:
Argument '' isn't numeric in numeric gt (<>)

perl -we "print 'x' > 1;"
Warning:
Argument 'x' isn't numeric in numeric gt (<>)

As you can probably see, this means that $CFG->{debug} is defined as an empty string.

Last edited by:

Recall: Nov 26, 2003, 9:30 AM
Quote Reply
Re: [Recall] Argument "" isn't numeric in numeric gt (>) In reply to
Awesome. So GT just needs to change the admin so that there is a dropdown list (or tick box) with either a 1 or a 0 for debugging. This will eliminate the problem when someone just blanks out the value. Either that or change the wording in the admin so that it says the value needs to be a 1 or a 0 and not blank.

~Charlie