[Bb-trac] [bbPress] #1003: regex parsing error on page_number_links when pretty permalinks off

bbPress bb-trac at lists.bbpress.org
Fri Dec 5 22:31:26 GMT 2008


#1003: regex parsing error on page_number_links when pretty permalinks off
----------------------+-----------------------------------------------------
 Reporter:  _ck_      |       Owner:                    
     Type:  defect    |      Status:  new               
 Priority:  normal    |   Milestone:  1.0-beta & XML-RPC
Component:  Back-end  |     Version:  1.0-beta (trunk)  
 Severity:  normal    |    Keywords:                    
----------------------+-----------------------------------------------------
 I can't quite figure out the cause on this one but working on it:

 no error on this `?q=test&page=2`

 but this `?page=2&q=test` causes

 ''Warning: preg_replace() [function.preg-replace]: Compilation failed:
 nothing to repeat at offset 0 in bb-includes/functions.bb-template.php on
 line 1117
 ''

 just above the page number links at the bottom of the page.

 `function get_page_number_links($page, $total) {`

 Line 1117
 `$uri = preg_replace('!?page=[0-9]+!', '%_%', $uri );`


 Is that `?` a look ahead in the regex? I have to go check a reference.

-- 
Ticket URL: <http://trac.bbpress.org/ticket/1003>
bbPress <http://bbpress.org/>
Innovative forum development


More information about the Bb-trac mailing list