Page MenuHomePhabricator

The deprecated is_a() function is used in StubObjects.php
Closed, ResolvedPublic

Description

Author: hoborp

Description:
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.)


Version: unspecified
Severity: trivial

Details

Reference
bz8944

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:31 PM
bzimport set Reference to bz8944.
bzimport added a subscriber: Unknown Object (MLST).

hoborp wrote:

patched StubObject.php

Attached:

Committed as r19896

And typo fixed by r19897