WordPress.org

Making WordPress.org


Ignore:
Timestamp:
01/10/2017 10:13:25 PM (3 years ago)
Author:
dd32
Message:

Plugin Directory: Add default meta fallback values where needed to avoid PHP warnings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-screenshots.php

    r4505 r4622  
    1818
    1919        // All indexed from 1.
    20         $descriptions = get_post_meta( $plugin->ID, 'screenshots', true );
    21         $screen_shots = get_post_meta( $plugin->ID, 'assets_screenshots', true );
     20        $descriptions = get_post_meta( $plugin->ID, 'screenshots', true ) ?: array();
     21        $screen_shots = get_post_meta( $plugin->ID, 'assets_screenshots', true ) ?: array();;
    2222
    2323        if ( empty( $screen_shots ) ) {
Note: See TracChangeset for help on using the changeset viewer.