• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item6375: Use of uninitialized value in string eq at .../TWikiUserMapping.pm

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal Closed   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

I'm getting the following error in my apache error_log file whenever I request any topic. But the topic displays just fine:
[Mon Dec 21 17:48:53 2009] [error] [client 10.84.125.100] [Mon Dec 21 17:48:53 2009] view: Use of uninitialized value
in string eq at /Library/WebServer/Documents/twiki/lib/TWiki/Users/TWikiUserMapping.pm line 471.
Then when I attempt to edit a topic, I'm taken to the edit screen, and the changes are accepted, so TWiki seems to be working. But we also get these two errors in the apache error_log file:
[Mon Dec 21 17:49:17 2009] [error] [client 10.84.125.100] Use of uninitialized value in
string eq at /Library/WebServer/Documents/twiki/lib/TWiki/Users/TWikiUserMapping.pm
line 471., referer: http://xxx.yyy.com/wiki/Myweb/MyTopic
[Mon Dec 21 17:49:18 2009] [error] [client 10.84.125.100] Use of uninitialized value in
string eq at /Library/WebServer/Documents/twiki/lib/TWiki/Users/TWikiUserMapping.pm
line 471., referer: http://xxx.yyy.com/wiki/bin/edit/Myweb/MyTopic?t=1261446533;nowysiwyg=0
FYI, this has been reported by at least two other users in http://twiki.org/cgi-bin/view/Support/SID-00663

-- TWiki:Main/BarryLake - 22 Dec 2009

You can fix this error by making a small change to the twiki/lib/TWiki/Users/TWikiUserMapping.pm file. The offending line, as reported in the Apache error_log, is line 471:

   return 1 if $cUID eq $this->{session}->{user};
Change that to:
   return 1 if (defined $this->{session}->{user} && $cUID eq $this->{session}->{user});
That certainly fixes the errors in the Apache log, but I'm not sure if it's the correct fix, as it simply masks what might be another potential problem elsewhere. It might be worth someone's while to determine why the $this->{session}->{user} variable is not defined when perhaps it should be.

-- TWiki:Main.BarryLake - 12 May 2010

Thank you Barry! Fix looks good. I checked in in SVN trunk and 4.3 branch.

-- TWiki:Main.PeterThoeny - 12 May 2010

ItemTemplate
Summary Use of uninitialized value in string eq at .../TWikiUserMapping.pm
ReportedBy TWiki:Main.BarryLake
Codebase 4.3.2
SVN Range TWiki-5.0.0, Sun, 27 Sep 2009, build 18153
AppliesTo Engine
Component

Priority Normal
CurrentState Closed
WaitingFor

Checkins TWikirev:18648 TWikirev:18649
TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2011-08-05 - PeterThoeny
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback