Make WordPress Core

Opened 5 years ago

Last modified 5 years ago

#48573 new defect (bug)

Permalinks Settings screen unnecessarily calls sanitize_option( 'permalink_structure' )...

Reported by: pbiron's profile pbiron Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Options, Meta APIs Keywords: 2nd-opinion
Focuses: administration Cc:


...just before it calls WP_Rewrite::set_permalink_structure().

It is unnecessary because sanitize_option() will be called by the update_option() call in WP_Rewrite::set_permalink_structure() if it the value needs to be sanitized (i.e., it has changed).

Change History (2)

#1 @pbiron
5 years ago

  • Keywords 2nd-opinion added

If it really is necessary for the Permalink Setting screen to sanitize the new value before calling WP_Rewrite::set_permalink_structure(), then shouldn't it also sanitize $category_base and $tag_base before calling WP_Rewrite::set_[category|tag]_base()?

I'll do a patch either way (i.e., removing the unnecessary call or adding the 2 missing calls) as soon as others confirm which way to go.

#2 @SergeyBiryukov
5 years ago

  • Focuses administration added
Note: See TracTickets for help on using tickets.