#46064 closed enhancement (invalid)
Check for protected endpoint is done twice in a row
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 5.1 |
Component: | Site Health | Keywords: | has-patch servehappy |
Focuses: | Cc: |
Description
The following piece of code is found in WP_Fatal_Error_Handler::handle()
:
<?php // If the error was stored and thus the extension paused, // redirect the request to catch multiple errors in one go. if ( $this->store_error( $error ) ) { $this->redirect_protected(); }
Both of these methods start with an early bail check to assert it is indeed a protected endpoint, which is wasteful.
Attachments (1)
Change History (7)
Note: See
TracTickets for help on using
tickets.
I suggest just removing the second check, as that method is
protected
and only ever called within the conditional that calls thestore()
method.