Making WordPress.org


Ignore:
Timestamp:
01/12/2021 01:45:56 AM (6 years ago)
Author:
dd32
Message:

Theme Directory: Avoid two PHP Notices when uplaoding a brand new theme.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/class-wporg-themes-upload.php

    r10569 r10570  
    855855                        ) );
    856856
    857                         $theme_is_older_than_two_years = strtotime( $this->theme_post->post_modified ) < strtotime( '-2 years' );
     857                        $theme_is_older_than_two_years = $this->theme_post && ( strtotime( $this->theme_post->post_modified ) < strtotime( '-2 years' ) );
    858858
    859859                        // Theme review team auto-approves theme-updates, so mark the theme as live immediately, if last updated within two years.
Note: See TracChangeset for help on using the changeset viewer.