/**
* Clean up broken, unparseable titles.
*
- * Usage: php cleanupTitles.php [--fix]
- * Options:
- * --fix Actually clean up titles; otherwise just checks for them
- *
* Copyright © 2005 Brion Vibber <brion@pobox.com>
* https://www.mediawiki.org/
*
$clean = 'Broken/' . $prior;
$verified = Title::makeTitleSafe( $ns, $clean );
- if ( $verified->exists() ) {
+ if ( !$verified || $verified->exists() ) {
$blah = "Broken/id:" . $row->page_id;
$this->output( "Couldn't legalize; form '$clean' exists; using '$blah'\n" );
$verified = Title::makeTitleSafe( $ns, $blah );