[wp-trac] [WordPress Trac] #17670: PHP Notices when Attachment is accessed via wrong url via pagerewrite

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 31 12:30:47 UTC 2011


#17670: PHP Notices when Attachment is accessed via wrong url via pagerewrite
------------------------------+------------------
 Reporter:  dd32              |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  3.3
Component:  Warnings/Notices  |     Version:  3.1
 Severity:  normal            |  Resolution:
 Keywords:  has-patch         |
------------------------------+------------------

Comment (by dd32):

 It looks like that approach passes with breakneck speed, however the
 testing doesn't cover non-existent url's (such as level-5/level-2/level-3/
 and /level-2/level-2/level-3/) which erroneously return level-3 as being
 the page we're on, even though the parents don't match.

 I'm attaching the same benchmark script with a few alterations I've made
 (Extra few fail test sets and my rewrite of it - I'm leaning towards the
 rewrite as it ultimately ends up looking cleaner than a simple patch).
 It's benchmarking about the same for me.

 We'll need some proper [http://unit-tests.trac.wordpress.org/ Unit Test]
 coverage for this change however, to catch any other edge cases I've
 missed

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17670#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list