Changeset 13690 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/event/event-repository.php
- Timestamp:
- 05/10/2024 12:42:51 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-events/includes/event/event-repository.php
r13683 r13690 131 131 132 132 try { 133 $meta = $this->get_event_meta( $id ); 133 $meta = $this->get_event_meta( $id ); 134 if ( ! $meta ) { 135 return null; 136 } 134 137 $event = new Event( 135 138 intval( $post->post_author ), … … 502 505 * @throws Exception 503 506 */ 504 private function get_event_meta( int $event_id ): array {507 private function get_event_meta( int $event_id ): ?array { 505 508 $meta = get_post_meta( $event_id ); 506 509 $utc = new DateTimeZone( 'UTC' ); 510 511 if ( ! isset( $meta['_event_start'][0], $meta['_event_end'][0], $meta['_event_timezone'][0] ) ) { 512 return null; 513 } 507 514 508 515 return array(
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)