Array union in generate_rewrite_rules doesn't achieve expected effect.
|Reported by:||majelbstoat||Owned by:||ryan|
|Severity:||normal||Keywords:||rewrite rules array union bg|has-patch|
Line 1287 of classes.php:
$post_rewrite = $rewrite + $post_rewrite;
doesn't actually assign what you would expect ($rewrite followed by $post_rewrite) to $post_rewrite. It in fact assigns ($post_rewrite followed by $rewrite). The difference is subtle, but can be important for plugins that wish to generate their own rewrite rules.
An example of the problem with assignments this way is at:
From this example, you can see that assigning the result to a new variable achieves the intended order. The patch supplied assigns the result temporarily to a new variable and then immediate copies it back to $post_rewrite, which fixes the problem for me on PHP versions 4.3.4 and 4.3.11.