Last modified: 2010-05-15 15:29:15 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 T2506, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 506 - displays warning array_key_exists() on top of the page.
displays warning array_key_exists() on top of the page.
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.3.x
PC Windows 2000
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://www.ZoomnQRacing.com/PowerBook
:
: 720 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-09-16 19:37 UTC by Quentin
Modified: 2010-05-15 15:29 UTC (History)
1 user (show)

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


Attachments

Description Quentin 2004-09-16 19:37:29 UTC
Warning: array_key_exists(): The first argument should be either a string or an 
integer in C:\Inetpub\www.ZoomnQRacing.com\PowerBook\includes\User.php on line 128
Comment 1 JeLuF 2004-09-16 20:30:21 UTC
Can't see a warning at the specified URL. Where does it show the warning?
Comment 2 Quentin 2004-09-16 20:41:41 UTC
From the main page, press edit.  (In reply to comment #0)

> Warning: array_key_exists(): The first argument should be either a string or an 
> integer in C:\Inetpub\www.ZoomnQRacing.com\PowerBook\includes\User.php on line 128

Comment 3 Wil Mahan 2004-09-19 01:21:21 UTC
The line in question in 1.3.3 is

 if ( array_key_exists( $wgIP, $wgProxyList ) ) {

$wgIP is supposed to be set from the REMOTE_ADDR environment variable in
Setup.php. It appears that for some reason it is not.
Comment 4 Troy Thompson 2004-09-20 21:10:51 UTC
http://us2.php.net/getenv says this:

Note:  This function does not work in ISAPI mode.

I have my IIS server running ISAPI mode, and get this bug. Perhaps occurrances of getenv() 
should use $_SERVER[''] instead.

WORKAROUND: Change Setup.php as follows, line 35:

	$wgIP = $_SERVER['REMOTE_ADDR'];

Additional use of getenv() include the following:
includes/DefaultSettings.php
includes/Parser.php
irc/rc2irc.php
Comment 5 Wil Mahan 2004-09-20 21:56:31 UTC
Thanks for getting to the bottom of this, Troy. I've fixed this in HEAD, and the
change can be made in REL1_3 if no problems turn up.
Comment 6 Troy Thompson 2004-10-15 20:58:36 UTC
(In reply to comment #5)
> Thanks for getting to the bottom of this, Troy. I've fixed this in HEAD, and the
> change can be made in REL1_3 if no problems turn up.

Just installed the latest version 1.3.6 and the problem is still there. Maybe
I'll report this bug again for the new release.
Comment 7 Brion Vibber 2004-10-15 21:50:21 UTC
*** Bug 720 has been marked as a duplicate of this bug. ***
Comment 8 Wil Mahan 2004-10-18 04:24:46 UTC
Committed the fix to REL1_3; it will be in the next release.
Comment 9 Quentin 2004-10-24 00:38:47 UTC
as of 1.3.7 this problem still exists.  
Comment 10 Brion Vibber 2005-01-30 05:02:18 UTC
1.3.7 predates the fix being committed, so it's expected that it would not contain the fix. The described fix is present in 1.3.8, 
1.3.9, and the 1.4 betas.

Resolving as FIXED pending further details.

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


Navigation
Links