This commit is contained in:
Javier Casares 2026-09-17 10:57:29 +00:00
commit c72a96e2a0

View file

@ -1113,14 +1113,16 @@ class Profile_Settings {
/**
* Append the 2FA section anchor to redirects when requested.
*
* @param string $location Redirect destination.
* @param int $status HTTP status code.
* @param string|null $location Redirect destination (null from sloppy wp_redirect() callers).
* @param int|null $status HTTP status code.
*
* @return string
*/
public function maybe_append_section_anchor( string $location, int $status ): string {
public function maybe_append_section_anchor( ?string $location, ?int $status = null ): string {
unset( $status );
$location = $location ?? '';
if ( ! $this->focus_section ) {
return $location;
}