Skip to content

Commit

Permalink
Various Notice fixes (#1237)
Browse files Browse the repository at this point in the history
* 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`.
  • Loading branch information
dd32 authored Feb 6, 2024
1 parent 0f004df commit c914a9f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public function get_default_application_values() {
public function create_post( $data ) {
// Create the post.
$wordcamp_user_id = get_user_by( 'email', 'support@wordcamp.org' )->ID;
$statues = \WordCamp_Loader::get_post_statuses();
$statuses = \WordCamp_Loader::get_post_statuses();

$post = array(
'post_type' => self::get_event_type(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ public function enforce_post_status( $post_data, $post_data_raw ) {
return $post_data;
}

$post = get_post( $post_data_raw['post_ID'] );
$post = get_post( $post_data_raw['ID'] );
if ( ! $post ) {
return $post_data;
}
Expand Down

0 comments on commit c914a9f

Please sign in to comment.