Skip to:
Content

bbPress.org

Changeset 7115


Ignore:
Timestamp:
08/10/2020 07:44:46 PM (3 months ago)
Author:
xknown
Message:

PHP 7.4 Compat: Don't use curly braces for array/string access

Location:
branches/0.9
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/0.9/bb-admin/export.php

    r1386 r7115  
    4646                $data .= str_repeat("\t", $tabs + 1) . "<meta key='$mk'><![CDATA[$mv]]></meta>\n";
    4747        } else {
    48             if ( '!' == $k{0} ) {
     48            if ( '!' == $k[0] ) {
    4949                $k = substr($k, 1);
    5050                $v = "<![CDATA[$v]]>";
     
    6666    $r = array();
    6767    foreach ( $translate as $prop => $export ) {
    68         if ( '?' == $export{0} ) {
     68        if ( '?' == $export[0] ) {
    6969            $export = substr($export, 1);
    7070            if ( !$data[$prop] ) {
  • branches/0.9/bb-includes/deprecated.php

    r6206 r7115  
    547547function bb_convert_path_base( $path, $from_base, $to_base ) {
    548548    bb_log_deprecated('function', __FUNCTION__, 'no alternative');
    549     $last_char = $path{strlen($path)-1};
     549    $last_char = $path[strlen($path)-1];
    550550    if ( '/' != $last_char && '\\' != $last_char )
    551551        $last_char = '';
  • branches/0.9/bb-includes/kses.php

    r6162 r7115  
    461461  $allowed = false;
    462462  foreach ($allowed_protocols as $one_protocol)
     463  {
    463464    if (strtolower($one_protocol) == $string2)
    464465    {
     
    466467      break;
    467468    }
     469  }
    468470
    469471  if ($allowed)
  • branches/0.9/bb-includes/template-functions.php

    r6159 r7115  
    20482048
    20492049    foreach ( (array) $tags as $tag ) {
    2050         $counts{$tag->raw_tag} = $tag->tag_count;
    2051         $taglinks{$tag->raw_tag} = bb_get_tag_link( $tag->tag );
     2050        $counts[$tag->raw_tag] = $tag->tag_count;
     2051        $taglinks[$tag->raw_tag] = bb_get_tag_link( $tag->tag );
    20522052    }
    20532053
     
    20662066
    20672067    foreach ( $counts as $tag => $count ) {
    2068         $taglink = attribute_escape($taglinks{$tag});
     2068        $taglink = attribute_escape($taglinks[$tag]);
    20692069        $tag = str_replace(' ', '&nbsp;', wp_specialchars( $tag ));
    20702070        $a[] = "<a href='$taglink' title='" . attribute_escape( sprintf( __('%d topics'), $count ) ) . "' rel='tag' style='font-size: " .
Note: See TracChangeset for help on using the changeset viewer.