[wp-trac] [WordPress Trac] #28517: Logic error in WP_Rewrite flush_rules
WordPress Trac
noreply at wordpress.org
Mon Jun 16 19:57:04 UTC 2014
#28517: Logic error in WP_Rewrite flush_rules
-------------------------------------+------------------------------
Reporter: numis | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Rewrite Rules | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses:
-------------------------------------+------------------------------
Changes (by numis):
* keywords: needs-patch => has-patch needs-testing
Comment:
Denis, thank you for providing the feedback. I agree with both points
that you made and have uploaded a second version of the patch to reflect
each.
{{{
#!html
<span style="color:green;">28517.2.with-tests.patch</span>
}}}
The following scenarios would now be:
||= **$hard** =||= **apply_filters returns** =||= **operation
attempted** =||
|| true (default) || true (default) || HARD ||
|| true (default) || false || SOFT ||
|| false || true || HARD ||
|| false || false (default) || SOFT ||
For clarity, the existing scenarios are:
||= **$hard** =||= **apply_filters returns** =||= **operation
attempted** =||
|| true (default) || true (default) || HARD ||
|| true (default) || false || SOFT ||
|| false || true **(default)** || **SOFT** ||
|| false || false || SOFT ||
So under the default scenario for both the existing codebase and the
patch, the same operation is attempted (a HARD flush). However, with the
proposed patch, in the event that someone uses flush_rewrite_rules_hard to
return true, a HARD flush will actually be attempted instead of the SOFT
flush.
Thank you again Denis for taking the time to provide some constructive
feedback.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28517#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list