On 1/25/02 9:08 AM +0000, Andy Wardley wrote:

> On Thu, Jan 24, 2002 at 08:53:03PM -0500, David Miller wrote:
>> I get this error repeated a few dozen times at the top of the query.cgi
>> page in Bugzilla:
>>
>> Can't locate Apache/Util.pm in @INC
>
> That shouldn't happen.  The error is being generated by the new code
> added to the html filter which tries to use Apache::Util or HTML::Entities
> if either is installed.
>
> However, the code is this:
>
>     # if Apache::Util is installed then we use it
>     eval {
>         require Apache::Util;
>         Apache::Util::escape_html('');
>     };
>     return \&Apache::Util::escape_html
>         unless $@ || $opts->{ entity };
>
> I don't see why the code should be generating warnings when it's wrapped
> inside an eval { } block.

Maybe it's precedence...  what's $opts->{ entity }?  is that empty, and so
it's evaluating to false and matching the other condition of the or?  Maybe
some parens to clarify the precedence would help.

or...  if that evaluates to true, what happens after that line if it
doesn't return there?

or...  is it possible that because of the ordering, it's checking for the
existance of \&Apache::Util::escape_html before the unless fires even
though it's not running it yet because of the conditional?
-- 
Dave Miller    [EMAIL PROTECTED] + [EMAIL PROTECTED]
Lead Software Engineer/System Administrator, Syndicomm Online
http://www.syndicomm.com/            http://www.justdave.net/


Reply via email to