[dw-free] Fix error log message:
[commit: http://hg.dwscoalition.org/dw-free/rev/255031e8e79e]
Fix error log message:
value for memkey:embedcont:221015:180 is not defined at /home/dw/current
/cgi-bin/Cache/Memcached.pm line 476
Turns out, the HTML cleaner has a bogus mode where if you pass it an empty
string or something that entirely gets stripped, it returns undef. This
causes a problem later when Cache::Memcached tries to store it.
Patch by
mark.
Files modified:
Fix error log message:
value for memkey:embedcont:221015:180 is not defined at /home/dw/current
/cgi-bin/Cache/Memcached.pm line 476
Turns out, the HTML cleaner has a bogus mode where if you pass it an empty
string or something that entirely gets stripped, it returns undef. This
causes a problem later when Cache::Memcached tries to store it.
Patch by
![[staff profile]](https://www.dreamwidth.org/img/silk/identity/user_staff.png)
Files modified:
- cgi-bin/cleanhtml.pl
-------------------------------------------------------------------------------- diff -r 7ae5063f002e -r 255031e8e79e cgi-bin/cleanhtml.pl --- a/cgi-bin/cleanhtml.pl Fri Aug 07 09:42:53 2009 -0500 +++ b/cgi-bin/cleanhtml.pl Fri Aug 07 15:42:52 2009 +0000 @@ -97,8 +97,13 @@ sub clean sub clean { my $data = shift; + return undef unless defined $$data; + my $opts = shift; - my $newdata; + + # this has to be an empty string because otherwise we might never actually append + # anything to it if $$data contains only invalid content + my $newdata = ''; # remove the auth portion of any see_request.bml links $$data =~ s/(see_request\.bml\S+?)auth=\w+/$1/ig; --------------------------------------------------------------------------------