When page is in Versions tab I get "Call to a member function getUserName() on null"
Permalink
I have this piece of code
which works a treat in page. But when I go to do a roll back in the versions tab I click an old page to see and i get this
"Call to a member function getUserName() on null"
Any ideas or is this a bug?
$u = new User(); $ui = UserInfo::getByID($u->getUserID()); $userName = $ui->getUserName();
which works a treat in page. But when I go to do a roll back in the versions tab I click an old page to see and i get this
"Call to a member function getUserName() on null"
Any ideas or is this a bug?
The problem was when in version tab there is no user set.