Make WordPress Core

Opened 7 years ago

Last modified 7 years ago

#48573 new defect (bug)

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

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

Description

...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
7 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
7 years ago

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