Last modified: 2007-02-12 20:22:41 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 8944 - The deprecated is_a() function is used in StubObjects.php
The deprecated is_a() function is used in StubObjects.php
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Low trivial (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-reviewed
Depends on:
Blocks: code_quality
  Show dependency treegraph
 
Reported: 2007-02-10 21:32 UTC by Peter Hobor
Modified: 2007-02-12 20:22 UTC (History)
0 users

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


Attachments
patched StubObject.php (3.64 KB, patch)
2007-02-11 15:46 UTC, Peter Hobor
Details

Description Peter Hobor 2007-02-10 21:32:09 UTC
The deprecated is_a() function is used in StubObjects.php line 27 in the
isRealObject function.
The is_a() function is deprecated as of PHP 5 in favor of the instanceof type
operator.
(http://php.net/manual/en/function.is-a.php)

The correct function should look like:
	static function isRealObject( $obj ) {
		return is_object( $obj ) && !($obj instanceof StubObject) ;
	}

(I tested with this code above, and it is working fine.)
Comment 1 Peter Hobor 2007-02-11 15:46:29 UTC
Created attachment 3206 [details]
patched StubObject.php
Comment 2 Antoine "hashar" Musso (WMF) 2007-02-12 20:18:28 UTC
Committed as r19896
Comment 3 Antoine "hashar" Musso (WMF) 2007-02-12 20:22:41 UTC
And typo fixed by r19897

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


Navigation
Links