On Thu, Mar 24, 2011 at 10:16 AM, Scheid, Bernhard <
Bernhard.Scheid(a)oeaw.ac.at> wrote:
I use MW 1.15 and heavily rely on extension:css. Last
night the server of
my wiki changed from PHP5.2 to PHP5.3 and #css no longer worked.
I went to the Mediawiki Site and found that others had that problem too
but no solution:
http://www.mediawiki.org/wiki/Extension_talk:CSS#Current_Version_Compatabil…
This doesn't look like a problem in Extension:CSS itself, but is rather due
to changes in PHP from 5.2 to 5.3 affecting how some parts of MediaWiki
work. Internals changes in PHP's handling of reference variables cause some
old code patterns (which were often STRICTLY NECESSARY in the PHP 4.x days)
to move from being harmless but unnecessary to either not working, or
working but throwing an error message which itself causes problems.
The correct fix is to either:
- Upgrade MediaWiki to a version that works with PHP 5.3 (try 1.16 or 1.17
release candidate?)
- Downgrade PHP to a version that works with MediaWiki 1.15
If you can't do either of those, then you can attempt to copy over all the
various PHP 5.3 compatibility fixes into your old version, starting with
removing the '&' reference marker on the parameter on Language::getMagic()
(in languages/Language.php). However you will likely encounter other similar
problems.
Change this line:
function getMagic( &$mw ) {
To this:
function getMagic( $mw ) {
-- brion