WordPress.org

Making WordPress.org

Changeset 1173


Ignore:
Timestamp:
01/23/2015 06:27:26 AM (5 years ago)
Author:
obenland
Message:

developer.wordpress.org: Check if $meta is an array before trying to access a key.

Fixes an Illegal string offset PHP warning.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php

    r1172 r1173  
    755755        foreach ( $since_terms as $since_term ) {
    756756            foreach ( $since_meta as $meta ) {
    757                 if ( $since_term->name == $meta['content'] ) {
     757                if ( is_array( $meta ) && $since_term->name == $meta['content'] ) {
    758758                    $description = empty( $meta['description'] ) ? '' : '<span class="since-description">' . esc_html( $meta['description'] ) . '</span>';
    759759
Note: See TracChangeset for help on using the changeset viewer.