Last modified: 2007-02-12 20:22:41 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 T10944, the corresponding Phabricator task for complete and up-to-date bug report information.
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