I am not sure if this is Core or
BlackListPlugin that makes a mistake.
So for now I will label it Core.
In my error_log I was getting sporatic cases of.
save: Use of uninitialized value in concatenation (.) or string at /usr/local/apache2/twiki/lib/TWiki/Net.pm line 141., referer: http://merlin.lavrsen.dk/twiki/bin/edit/Myweb/WebHome
Sometimes I would get it with upload.
And I could never make it happen again. Then it occured to me that
BlackListPlugin only fetches spam lists now and then and always when saving.
So I deleted all the pub/TWiki/BlackListPlugin _something files which triggers a new fetch of spam list. And this triggers the bug consistantly.
I put in some debug code.
sub _getURLUsingLWP {
my( $this, $protocol, $host, $port, $path, $user, $pass ) = @_;
$port ||= '';
my $request;
require HTTP::Request;
print STDERR "host: $host, port: $port, path: $path\n";
$request = HTTP::Request->new(GET => "$protocol://$host$port$path");
and the result in the error_log is
host: 0, port: /cgi-bin/spam-merge, path: , referer: http://merlin.lavrsen.dk/twiki/bin/edit/Myweb/WebHome
So $host has the value 0. $port has the value /cgi-bin/spam-merge, and path is undefined. It seems that the function is called with a missing parameter so host is missing, the port number becomes host, the path becomes port and path is never defined.
KJL
I see the problem now.
It is the
BlackListPlugin which is calling internal TWiki function calls directly.
The plugin calls TWiki::Net::getUrl( $host, $port, $path )
But the syntax is getUrl($protocol, $host, $port, $url, $user, $pass )
KJL
This was fixed a few days ago,
Item2391, SVN r12345, r12348, r12349.
--
PTh