https://bugzilla.wikimedia.org/show_bug.cgi?id=63625

            Bug ID: 63625
           Summary: Fatal error: Call to a member function getFullUrl() on
                    a non-object in CentralAuthHooks.php on line 1106
           Product: MediaWiki extensions
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: CentralAuth
          Assignee: wikibugs-l@lists.wikimedia.org
          Reporter: aude.w...@gmail.com
                CC: agarr...@wikimedia.org, vasi...@gmail.com,
                    wikimedia.b...@snowolf.eu
       Web browser: ---
   Mobile Platform: ---

in CentralAuthHooks, if $wiki in "$wiki = WikiMap::getWiki( wfWikiID() );" is
null, then we get a fatal error.

I see such code elsewhere in the hooks file without checks for if $wiki is
valid.

If configuration of $wgConf is not correct, then the $wiki can be null.  The
code should probably throw an exception and then have some graceful error
handling. 

Though not exactly sure what/how to handle the error, and I find it a bit
unclear to understand what the hooks are trying to do.

Fatal error: Call to a member function getFullUrl() on a non-object in
/Library/WebServer/Documents/php-master/extensions/CentralAuth/CentralAuthHooks.php
on line 1106
Call Stack
#    Time    Memory    Function    Location
1    0.0007    652864    {main}( )    ../index.php:0
2    0.3577    18514840    MediaWiki->run( )    ../index.php:46
3    0.3578    18514840    MediaWiki->main( )    ../Wiki.php:447
4    0.7266    35420480    OutputPage->output( )    ../Wiki.php:598
5    0.7598    37910584    wfRunHooks( )    ../OutputPage.php:2083
6    0.7598    37910632    Hooks::run( )    ../GlobalFunctions.php:4009
7    0.7607    37912840   
call_user_func_array:{/Library/WebServer/Documents/php-master/includes/Hooks.php:206}
( )    ../Hooks.php:206
8    0.7607    37913264    CentralAuthHooks::onBeforePageDisplay( )   
../Hooks.php:206

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to