If the namespace is not valid; Title::makeTitleSafe() will
return null, thus producing a fatal error. Work arround this
by setting the namespace to 0 in that case.
Bug: 68501
Change-Id: I0c22f9468ff2bf11d2bf4a9265fa454ece2c0fa3
$ns = 0;
}
+ # Namespace which no longer exists. Put the page in the main namespace
+ # since we don't have any idea of the old namespace name. See bug 68501.
+ if ( !MWNamespace::exists( $ns ) ) {
+ $ns = 0;
+ }
+
$clean = 'Broken/' . $prior;
$verified = Title::makeTitleSafe( $ns, $clean );
if ( $verified->exists() ) {