Page MenuHomePhabricator

class LoggedInUserMode does not implement setEnabled()
Closed, InvalidPublic

Description

MW 1.35.3, PHP 7.4.27.

The class MobileFrontend\Features\LoggedInUserMode does not implement setEnabled() method declared in MobileFrontend\Features\IUserMode, which causes

[error] 1417#1417: *537 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Class MobileFrontend\Features\LoggedInUserMode contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (MobileFrontend\Features\IUserMode::setEnabled) in /var/www/wiki/w/extensions/MobileFrontend/includes/Features/LoggedInUserMode.php on line 20"

Event Timeline

This comment was removed by alex-mashin.
Reedy changed the task status from Open to Stalled.Feb 18 2022, 11:04 AM
Reedy added a subscriber: Reedy.

What version of MobileFrontend are you using?

In IUserMode in 1.35, it doesn't have a setEnabled function - https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/REL1_35/includes/Features/IUserMode.php

Similarly, LoggedInUserMode has no abstract functions - https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/REL1_35/includes/Features/LoggedInUserMode.php

Neither does master...

What version of MobileFrontend are you using?

I thought I was using REL1_35. Deleted the extension folder and cloned it again; the error disappeared. It seems I had messed it up with the IDE.