Last modified: 2012-12-12 13:46:00 UTC
I am running PHP 5.2.10 on IIS 6 on Windows Server 2003 but I believe it would affect anyone. The following bug was found while working with Mediawiki v1.15.1. If you attempt to run mediawiki's dumpBackup.php job, it generates the following error: "Notice: Undefined index: HTTP_USER_AGENT in <snip>extensions\FCKeditor\fckeditor\fckeditor_php5.php on line 37" The file in question attempts to access $_SERVER['HTTP_USER_AGENT'] without checking to see if it is set. To work around this, I modified fckeditor_php5.php to: <code> function FCKeditor_IsCompatibleBrowser() { $sAgent = ""; if (isset($_SERVER)) { if (isset$_SERVER['HTTP_USER_AGENT'])) { $sAgent = $_SERVER['HTTP_USER_AGENT']; } } else { ... </code>
I can verify this bug in MW 1.16 and PHP 5.3.2. The work-around here looks like it fixes the immediate problem, but I'm wondering why FCKeditor should even be included in command line mode? I think a better solution would be to avoid even loading the extension if $wgCommandLineMode is set. I've added the following to the top of my extensions\FCKeditor\FCKeditor.php file: // There is no real reason for FCKeditor to run in commandline mode! // This avoids breakage of scripts like dumpBackup.php if ( isset($wgCommandLineMode) && $wgCommandLineMode ) { return; // Simply return from the include, so no FCKeditor code is run }
Ported bug to upstream tracker: https://dev.ckeditor.com/ticket/6279 Patch added there.
*** Bug 25211 has been marked as a duplicate of this bug. ***
Comment by j.swiderski in upstream bug reports http://dev.ckeditor.com/ticket/5602 and https://dev.ckeditor.com/ticket/6279 : "FCKeditor and MediaWiki are no longer supported. Closing the ticked as invalid."