- # tidy up the user string
- $user =~ s/\&\&/ and /g;
- $user =~ s/\|\|/ or /g;
- $user =~ s/\!/ not /g;
- $user =~ s/\s+/ /g;
+ # tidy up the user string (why I have to stick in an if statement when I have initialised it I have no idea! 5.28 bug?
+ if ($user) {
+ $user =~ s/\&\&/ and /g;
+ $user =~ s/\|\|/ or /g;
+ $user =~ s/\!/ not /g;
+ $user =~ s/\s+/ /g;
+ }