[wp-trac] Re: [WordPress Trac] #2771: $rewrite array used as
WordPress Trac
wp-trac at lists.automattic.com
Sun Jun 18 22:23:51 GMT 2006
#2771: $rewrite array used as string in url_to_postid() function, breaks incoming
pingbacks if permalinks with pathinfo are used
--------------------------------------------------------------+-------------
Reporter: bernardos | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone:
Component: Administration | Version: 2.0.3
Severity: normal | Resolution:
Keywords: pingback, permalinks with pathinfo, possible fix |
--------------------------------------------------------------+-------------
Changes (by Webrocker):
* keywords: => pingback, permalinks with pathinfo, possible fix
* summary: $rewrite array used as string in url_to_postid function =>
$rewrite array used as string in
url_to_postid() function, breaks incoming
pingbacks if permalinks with pathinfo are used
* version: 2.1 => 2.0.3
Comment:
This will break Pingbacks if Permalinks with PATHINFO are used, because
the 'index.php/' part will always be removed from $url and thus no valid
postid will be returned.
Possible fix:
{{{if ( false === strpos( key($rewrite),'index.php/') )}}}
Assuming that the rewrite-rules all include 'index.php/' if Permalinks
with PATHINFO are used, it should be safe to only check the first key of
the $rewrite array.
--
Ticket URL: <http://trac.wordpress.org/ticket/2771>
WordPress Trac <http://wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list