Making WordPress.org

Changeset 5419


Ignore:
Timestamp:
04/28/2017 08:01:19 PM (8 years ago)
Author:
coffee2code
Message:

Plugin Directory, Author Card: Use is_numeric() instead of is_integer() in value check.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-author-card.php

    r5332 r5419  
    2323        ), 10, 6 );
    2424
    25         if ( is_int( $post_or_user_id ) ) {
     25        if ( is_numeric( $post_or_user_id ) ) {
    2626            $post   = '';
    2727            $author = get_user_by( 'id', $post_or_user_id );
    2828        } else {
    2929            $post   = $post_or_user_id ?: get_post();
    30             $author = get_user_by( 'id', $post->post_author );
     30            $author = is_object( $post ) ? get_user_by( 'id', $post->post_author ) : '';
    3131        }
    3232
Note: See TracChangeset for help on using the changeset viewer.