Make WordPress Core


Ignore:
Timestamp:
11/13/2010 09:53:55 AM (16 years ago)
Author:
nacin
Message:

Use square brackets instead of braces for string access. props hakre, fixes #13900.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/formatting.php

    r16313 r16340  
    9393        $curl = $textarr[$i];
    9494
    95         if ( !empty($curl) && '<' != $curl{0} && '[' != $curl{0}
     95        if ( !empty($curl) && '<' != $curl[0] && '[' != $curl[0]
    9696                && empty($no_texturize_shortcodes_stack) && empty($no_texturize_tags_stack)) {
    9797            // This is not a tag, nor is the texturization disabled
     
    114114             * tag opening
    115115             */
    116             if ('<' == $curl{0})
     116            if ('<' == $curl[0])
    117117                _wptexturize_pushpop_element($curl, $no_texturize_tags_stack, $no_texturize_tags, '<', '>');
    118             elseif ('[' == $curl{0})
     118            elseif ('[' == $curl[0])
    119119                _wptexturize_pushpop_element($curl, $no_texturize_shortcodes_stack, $no_texturize_shortcodes, '[', ']');
    120120        }
     
    14991499        for ($i = 0; $i < $stop; $i++) {
    15001500            $content = $textarr[$i];
    1501             if ((strlen($content) > 0) && ('<' != $content{0})) { // If it's not a tag
     1501            if ((strlen($content) > 0) && ('<' != $content[0])) { // If it's not a tag
    15021502                $content = preg_replace_callback($wp_smiliessearch, 'translate_smiley', $content);
    15031503            }
     
    26332633
    26342634        // Fragment has a specifier
    2635         if ( $pattern{$start} == '%' ) {
     2635        if ( $pattern[$start] == '%' ) {
    26362636            // Find numbered arguments or take the next one in order
    26372637            if ( preg_match('/^%(\d+)\$/', $fragment, $matches) ) {
Note: See TracChangeset for help on using the changeset viewer.