Last modified: 2010-05-15 15:59: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 T13733, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 11733 - Parameter validation in maintenance scripts needs work
Parameter validation in maintenance scripts needs work
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.11.x
All All
: Normal minor (vote)
: ---
Assigned To: Brion Vibber
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-21 20:06 UTC by Karsten Hiddemann
Modified: 2010-05-15 15:59 UTC (History)
0 users

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


Attachments

Description Karsten Hiddemann 2007-10-21 20:06:53 UTC
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.
Comment 1 Brion Vibber 2008-12-19 02:04:00 UTC
Fixed in r44792

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


Navigation
Links