[Rt-devel] Where is $RT::TicketBaseURI defined?
Duncan McEwan
duncan at mcs.vuw.ac.nz
Fri Aug 25 00:19:22 EDT 2006
We are running RT 3.4.5 abd have a locally developed system that uses
the RT API to create RT tickets.
I just noticed that when our system runs I get the following message in
my rt logs.
RT: Use of uninitialized value in concatenation (.) or string at \
/usr/pkg/lib/rt3/RT/Ticket_Overlay.pm line 243. \
(/usr/pkg/lib/rt3/RT.pm:287)
Line 243 of Ticket_Overlay.pm is:
#If it's a local URI, turn it into a ticket id
if ( $id =~ /^$RT::TicketBaseURI(\d+)$/ ) { # <----- line 243
$id = $1;
}
This is part of the Ticket->Load() method. I was pretty sure that we were
passing a valid $id value in so that suggested that the undefined value
was $RT::TicketBaseURI. And indeed some debugging I added just before the
above seemed to indicate that was the case. Furthermore a 'grep -R' of
all the likely places I could think of didn't reveal anywhere that this
variable was being set.
The other odd aspect is that we only see the warning when our own system
calls the RT API. We don't see it when the RT web interface loads tickets,
even though my debugging showed that it was still undefined in that case.
It's almost like warnings for uninitialised variables have been turned off,
but I couldn't see where or why that would have been done.
I've currently hacked around the problem by doing a
Set($TicketBaseURI, "");
in my RT_SiteConfig.pm. But I'd really rather prefer to understand what
was going on here so any suggestions would be appreciated.
Thanks,
Duncan
More information about the Rt-devel
mailing list