[rt-users] Fw: RT: Use of uninitialized value in lc at/usr/local/share/perl5/HTML/Mason/ApacheHandler.pm line 914

Richard Harman rt-users at richardharman.com
Fri Apr 29 13:04:18 EDT 2011


All - this is a bug in mod_perl v1/v2 capability detection in HTML::Mason.

Apr 29 12:22:01 xell RT: Use of uninitialized value in lc at
/usr/local/share/perl5/HTML/Mason/ApacheHandler.pm line 914.
(/usr/local/share/perl5/HTML/Mason/ApacheHandler.pm:914)

Change this:

    if ( lc $_[0]->dir_config('Filter') eq 'on' )

to this:

    if ( defined( $_[0]->dir_config('Filter')) && lc
$_[0]->dir_config('Filter') eq 'on' )

And that will silence the error message.  I am CC'ing the HTML::Mason
list so they are aware.

On 01/20/11 12:07, naresh at hewittandmay.com wrote:
> Hi
>
> Does anyone have thoughts on this warning message in the httpd logs
>
> Kind regards
>
> Naresh
>
> ------------------
>
> ------------------------------------------------------------------------
> *From: * Naresh Maharaj <naresh at hewittandmay.com>
> *Sender: * rt-users-bounces at lists.bestpractical.com
> *Date: *Wed, 19 Jan 2011 22:59:16 +0000
> *To: *<rt-users at lists.bestpractical.com>
> *Subject: *[rt-users] RT: Use of uninitialized value in lc at
> /usr/local/share/perl5/HTML/Mason/ApacheHandler.pm line 914
>
> All
>  
> We recently did a new install and have been having the same Warning in
> the apache logs ever since.
>  
> This is where the issue starts:
>  
> Logs:
> Jan  9 12:20:29 srikrsna yum[15593]: Installed:
> perl-Apache-DBI-1.09-1.fc14.noarch
> Jan  9 12:21:26 srikrsna RT: Use of uninitialized value in lc at
> /usr/local/share/perl5/HTML/Mason/ApacheHandler.pm line 914.
> (/usr/local/share/perl5/HTML/Mason/ApacheHandler.pm:914)
>  
> Line 914 below highlighted with ****
>  
> sub_apache_request_object
> {
>     my $self = shift;
>     # We need to be careful to never assign a new apache (subclass)
>     # object to $r or we will leak memory, at least with mp1.
>     my $new_r = APACHE2 ? $_[0] : HTML::Mason::Apache::Request->new(
> $_[0] );
>     my $r_sub;
> *** if ( lc $_[0]->dir_config('Filter') eq 'on' )
>     {
>         die "To use Apache::Filter with Mason you must have at least
> version 1.021 of Apache::Filter\n"
>             unless Apache::Filter->VERSION >= 1.021;
>         $r_sub = $do_filter;
>     }
>     else
>     {
>         $r_sub = $no_filter;
>     }
>     my $apreq_instance =
>           APACHE2
>         ? sub { Apache2::Request->new( $_[0] ) }
>         : sub { $_[0] };
>     return
>         $r_sub->( $self->args_method eq 'mod_perl' ?
>                   $apreq_instance->( $new_r ) :
>                   $new_r
>                 );
> }
>  
>  
>  
> have seen the following post but could not see a solution:
> http://www.gossamer-threads.com/lists/rt/users/96670
>  
> Does anyone know how I might be able to resolve this
>  
> Kind regards
>  
>
> Naresh Maharaj,
>
> Hewitt & May (Shirtmakers) Ltd
> email: info at hewittandmay.com <mailto:info at hewittandmay.com>
> web: http://www.hewittandmay.co.uk




More information about the rt-users mailing list