/**
* Entry point
*
- * @param string $par
+ * @param string|null $par
*/
public function execute( $par ) {
$request = $this->getRequest();
// parameter, but also as part of the primary url. This can have PII implications
// in releasing page view data. As such issue a 301 redirect to the correct
// URL.
- if ( strlen( $par ) && !strlen( $term ) ) {
+ if ( $par !== null && $par !== '' && $term === '' ) {
$query = $request->getValues();
unset( $query['title'] );
// Strip underscores from title parameter; most of the time we'll want