Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

[BUG] GLinks 3.2 - validating links

Quote Reply
[BUG] GLinks 3.2 - validating links
Hi Alex/Adrian/whoever reads this =)

There seems to be a bug in /admin/Links/Tools.pm, line 914.

Code:
# Load reason before setting the Add_Date/Mod_Date to today.
my $reason = Links::send_email('link_rejected.eml', { %$user, %$link }, { get_body => 1 });

If the user doesn't exist from this line:

Code:
my $user = $user_db->get($link->{LinkOwner}) || {};

..then you get a "Can't call as a HASH" error, cos the user doesn't exist - thus hashref doesn't exist =)

I only came across this randomly when fixing up a problem on a clients site, and it turned out he had a user that didn't exist - but had a record in the validation queue =)

Anyway, just FYI Smile

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] [BUG] GLinks 3.2 - validating links In reply to
Sorry, but how are you getting an error on the lines you specified? The $user = ... line is fine since the get() will return nothing and it will default to the empty hash. And because that always contains something the $reason = ... line is fine.

Adrian
Quote Reply
Re: [brewt] [BUG] GLinks 3.2 - validating links In reply to
Hi,

Yeah, it is a bit of a weird one.

Basically - if the LinkOwner does't exist for a link, it throws up this error on the Validate Page (only on the page where the link is, that has the missing LinkOwner);

Code:
Can't use an undefined value as a HASH reference at /home/user/domain.com/cgi-bin/admin/Links/Tools.pm line 911.
Please enable debugging in setup for more details.

Hope that helps =)

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!