Page MenuHomePhabricator

convertLqtPageOnLocalWiki.php should handle empty/invalid title
Closed, ResolvedPublic

Description

Currently it throws:

[2015-07-09 23:22:14] Starting LQT conversion of page

Catchable fatal error: Argument 1 passed to Flow\Import\Converter::convert() must be an instance of Title, null given, called in /mnt/srv/mediawiki-staging/php-master/extensions/Flow/includes/Import/Converter.php on line 108 and defined in /mnt/srv/mediawiki-staging/php-master/extensions/Flow/includes/Import/Converter.php on line 123

Hit this when accidentally had a blank line at the end of the file.

Event Timeline

Mattflaschen-WMF raised the priority of this task from to Needs Triage.
Mattflaschen-WMF updated the task description. (Show Details)
Catrope triaged this task as Medium priority.Aug 5 2015, 11:16 PM
Catrope set Security to None.
Krinkle subscribed.

It seems the latest version of this script does not accept an input file with line breaks. Instead, it accepts a single title via the srcpage option. It can still break if invoked once by hand with an invalid parameter, which could be given better validation/error message, but it no longer aborts half-way due to an extra empty line in a file or some such.