Making WordPress.org


Ignore:
Timestamp:
10/07/2020 04:16:56 AM (4 years ago)
Author:
dd32
Message:

Official Events: The time and utc_offset fields are not set when the event is "Needs a date and time".

This sets the date to 1970 which is what the current code already does, treating the unset items as null which cast to zero.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/official-wordpress-events/official-wordpress-events.php

    r10253 r10354  
    609609            }
    610610
     611            // Events that are "Needs a date and time" do not have the time/utc fields. Treat them as 1970-01-01 for now.
     612            if ( ! isset( $meetup['time'] ) ) {
     613                $meetup['time']       = 0;
     614                $meetup['utc_offset'] = 0;
     615            }
     616
    611617            /*
    612618             * Convert to local time, because the `date_utc` column in `wporg_events` is misnomed and actually
Note: See TracChangeset for help on using the changeset viewer.