[wp-trac] [WordPress Trac] #16892: make_clickable segfault

WordPress Trac wp-trac at lists.automattic.com
Fri Feb 10 13:58:17 UTC 2012


#16892: make_clickable segfault
-------------------------------------------------+-------------------------
 Reporter:  westi                                |       Owner:  duck_
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  3.4
Component:  Formatting                           |     Version:  3.1
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch needs-testing 3.4-early    |
  westi-likes                                    |
-------------------------------------------------+-------------------------

Comment (by TobiasBg):

 {{{
   if ( ')' == $matches[3] && strpos( $url, '(' ) ) {
 }}}
 in {{{_make_url_clickable_cb()}}} looks wrong, as a "(" as the first
 character (i.e. position 0) would be returned as falsy.
 If this is by design, {{{strpos( $url, '(' ) > 0}}} would be clearer, or
 if we want to recognize "(" as the first character, this needs to be
 {{{false === strpos( $url, '(' )}}}.

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


More information about the wp-trac mailing list