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

       Web browser: ---
             Bug #: 32853
           Summary: DBA backend is broken in MW 1.18 ($dir is an array)
           Product: MediaWiki
           Version: 1.18.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: General/Unknown
        AssignedTo: [email protected]
        ReportedBy: [email protected]
    Classification: Unclassified


In MediaWiki 1.18, when you set DBA as the main caching mechanism
($wgMainCacheType = CACHE_DB) you'll run into an error.

In includes/objectcache/DBABagOStuff.php on line 17 you check if $dir === false
or not. In my case it isn't, so you assign its value to $this->mFile =
"$dir/mw-cache-" . wfWikiID();.

The problem is that from v1.18 on the $dir is an array.

I got the following when I print_r'd the $dir variable in the first line of the
__construct function: Array ( [class] => DBABagOStuff ).

Of course in this case the $this->mFile = "$dir/mw-cache-" . wfWikiID(); line
will be broken also and that's why later MW cannot open the DBA cache.

For an ugly workaround I forced the $wgTempDirectory to be assigned to the $dir
variable:

if ( $dir === false || is_array($dir) ) {
    global $wgTmpDirectory;
    $dir = $wgTmpDirectory;
}

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- 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
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to