Skip to content

Commit c914a9f

Browse files
authored
Various Notice fixes (#1237)
* Use the right post ID field Fixes a Notice of `Undefined index: post_ID`. This likely previously worked, as `get_post( null )` quite possibly was returning the correct object. * Fix a variable typo Fixes a PHP Notice of `Undefined variable: statuses`.
1 parent 0f004df commit c914a9f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

public_html/wp-content/plugins/wcpt/wcpt-events/class-events-application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public function get_default_application_values() {
150150
public function create_post( $data ) {
151151
// Create the post.
152152
$wordcamp_user_id = get_user_by( 'email', '[email protected]' )->ID;
153-
$statues = \WordCamp_Loader::get_post_statuses();
153+
$statuses = \WordCamp_Loader::get_post_statuses();
154154

155155
$post = array(
156156
'post_type' => self::get_event_type(),

public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-admin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ public function enforce_post_status( $post_data, $post_data_raw ) {
817817
return $post_data;
818818
}
819819

820-
$post = get_post( $post_data_raw['post_ID'] );
820+
$post = get_post( $post_data_raw['ID'] );
821821
if ( ! $post ) {
822822
return $post_data;
823823
}

0 commit comments

Comments
 (0)