Author: mediawiki-bugzilla
Description:
In maintenance/importTextFile.php (and possible others, haven't checked) you see constructs like the following:
$title = Title::newFromUrl( $title );
echo( "\nUsing title '" . $title->getPrefixedText() . "'..." );
if( is_object( $title ) ) {and
$user = User::newFromName( $user );
echo( "\nUsing username '" . $user->getName() . "'..." );
if( is_object( $user ) ) {When checking if the returned result is an object or not, one shouldn't try to use class functions before the check, of course.
Version: 1.11.x
Severity: minor