Skip to content

mdjm_format_short_date() returns invalid date if no date is passed #153

Closed

Description

@mikeyhoward1977

The mdjm_format_short_date() function checks if the $date parameter has been passed to it. If it has not it uses current_time('timestamp') to define $date.

current_time('timestamp') returns the value as a double and therefore our checks to determine if the variable is a unix timestamp are failing.

To correct this validation we need to use...

if ( empty( $date ) )   {
    $date = (string) current_time( 'timestamp' );
}

Activity

  1. added a commit that references this issue on Sep 25, 2016
    ac4b731
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions