[wp-trac] [WordPress Trac] #23587: url_to_postid() needs to use # or @ for preg_match start/end character

WordPress Trac noreply at wordpress.org
Fri Jan 31 18:27:03 UTC 2014


#23587: url_to_postid() needs to use # or @ for preg_match start/end character
------------------------------+--------------------
 Reporter:  coreygilmore      |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  3.9
Component:  Rewrite Rules     |     Version:  1.5.2
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:
------------------------------+--------------------

Comment (by Denis-de-Bernardy):

 Replying to [comment:7 nacin]:
 > [attachment:23587_regex_delimiters.patch] looks OK to me. Is this
 something we could unit test?

 Methinks there are plenty already.

 > What if someone wrongly includes '#' in an existing rewrite rule? What
 happens currently?

 It doesn't work, per #12271 which got closed as wontfix.

 > If it has minimal side effects currently, switching to an E_WARNING
 doesn't sound very nice.

 They're already present with a # in a permalink structure anyway, when
 rewrite rules try to match pages on the front end.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/23587#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list