[wp-trac] [WordPress Trac] #28517: Logic error in WP_Rewrite flush_rules
WordPress Trac
noreply at wordpress.org
Sun Oct 26 20:32:52 UTC 2014
#28517: Logic error in WP_Rewrite flush_rules
-------------------------------------------------+-------------------------
Reporter: numis | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
Component: Rewrite Rules | Review
Severity: normal | Version: 3.7
Keywords: has-patch needs-testing needs-unit- | Resolution:
tests | Focuses:
-------------------------------------------------+-------------------------
Changes (by aaroncampbell):
* keywords: has-patch needs-testing => has-patch needs-testing needs-unit-
tests
Comment:
I agree with the general fix here (passing `$hard` to the filter so it can
override what's passed in), but I'm not sure about returning true and
false. True and false for a function like this should denote success and
failure, but that's not the case here. The patch is returning false to say
"we did a soft flush, not a hard one" and true to say "we attempted a hard
flush". I see that you're using the return for unit tests, but I think we
need to find a better way to handle those tests.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28517#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list