Make WordPress Core


Ignore:
Timestamp:
10/26/2015 03:08:47 PM (10 years ago)
Author:
SergeyBiryukov
Message:

In get_post_class(), ensure that we always coerce the class list passed to the function to an array, even when it's empty.

This is consistent with get_body_class(), see [18176].

See #34452.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post-template.php

    r35398 r35399  
    430430        }
    431431        $classes = array_map( 'esc_attr', $class );
     432    } else {
     433        // Ensure that we always coerce class to being an array.
     434        $class = array();
    432435    }
    433436
Note: See TracChangeset for help on using the changeset viewer.