Last modified: 2010-05-15 15:33:24 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 3274 - PHP Warnings
PHP Warnings
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
All Linux
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2005-08-26 01:17 UTC by Rick Harmeson
Modified: 2010-05-15 15:33 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Rick Harmeson 2005-08-26 01:17:47 UTC
During setup I am getting these warnings. Setup was fine on test box but had
local mysql server. Actual install for our use has networked mysql server. All
settings in LocalSettings.php are equal, except "localhost versus server_name"
Note, install could not complete the writing of LocalSettings.php. I copied it
over from test box and made appropriate changes. These errors below were logged
after turning on php errors. 

PHP Warning:  Illegal offset type in /home/cvs/support/mwiki/includes/Skin.php
on line 95

PHP Warning:  array_key_exists(): The first argument should be either a string
or an integer in /home/cvs/support/mwiki/includes/User.php on line 716
Comment 1 Brion Vibber 2005-08-26 02:10:52 UTC
The error messages you report, checking against code in 1.4.8 release, look very 
strange indeed, to the degree that I don't see how they could possibly happen 
unless PHP is broken/corrupted or the files have been altered or corrupted.

in Skin.php:
		$options = array( 'highlightbroken', 'hover' );
		foreach( $options as $opt ) {
			global $wgUser;
			$this->mOptions[$opt] = $wgUser->getOption( $opt );

The array index used can only by one of the strings 'highlightbroken' or 'hover', 
both of which are perfectly legal offset types.

in User.php:
	function getOption( $oname ) {
		if ( array_key_exists( $oname, $this->mOptions ) ) {

Called from the above, $oname will again be a perfectly valid string index.

As a test hack, you could add a var_dump( $opt ); line into the first section, 
inside the foreach look, to see what it thinks it has.

Also, can you try with 1.5rc3?

Note You need to log in before you can comment on or make changes to this bug.