} else {
// Use nice safe, sane, prefixes
preg_match( '/^[a-zA-Z]+_$/', $this->getOption( 'old' ), $m );
- $old = isset( $m[0] ) ? $m[0] : false;
+ $old = $m[0] ?? false;
}
// Allow for no new prefix
if ( $this->getOption( 'new', 0 ) === '0' ) {
} else {
// Use nice safe, sane, prefixes
preg_match( '/^[a-zA-Z]+_$/', $this->getOption( 'new' ), $m );
- $new = isset( $m[0] ) ? $m[0] : false;
+ $new = $m[0] ?? false;
}
if ( $old === false || $new === false ) {
- $this->error( "Invalid prefix!", true );
+ $this->fatalError( "Invalid prefix!" );
}
if ( $old === $new ) {
$this->output( "Same prefix. Nothing to rename!\n", true );
}
}
-$maintClass = "RenameDbPrefix";
+$maintClass = RenameDbPrefix::class;
require_once RUN_MAINTENANCE_IF_MAIN;