Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #18007, comment 6


Ignore:
Timestamp:
09/28/2012 03:40:36 PM (12 years ago)
Author:
challet
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #18007, comment 6

    initial v1  
    1818> This is a little tricky
    1919It is :)
     20
     21The problem is by using {{{$length = strlen( $data );}}} and {{{$lastc = $data[$length-1];}}} [http://core.trac.wordpress.org/browser/trunk/wp-includes/functions.php?rev=17779#L249 here],
     22we're not getting the last char because {{{$data[$anynumber]}}} will retrieve the $anynumber byte, not char.
     23While the purpose to use {{{$lastc = substr($data, -1);}}} is to have exactly the last char, even whith multibytes overloading on.