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

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T5274, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 3274 - PHP Warnings
PHP Warnings
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.4.x
All Linux
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://wiki.support.bravenet.com
:
Depends on:
Blocks:
  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: ---


Attachments

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 ) {
		$this->loadFromDatabase();
		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.


Navigation
Links