Skip to content

Commit 759de2e

Browse files
authored
Fix: Undefined property: stdClass::$ID (#1328)
1 parent 114b66d commit 759de2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

includes/scheduler/class-post.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public static function schedule_post_activity( $new_status, $old_status, $post )
118118
public static function rest_insert( $post, $request ) {
119119
$metas = $request->get_param( 'meta' );
120120

121-
if ( ! $post->ID || ! $metas || ! is_array( $metas ) ) {
121+
if ( empty( $post->ID ) || ! $metas || ! is_array( $metas ) ) {
122122
return $post;
123123
}
124124

0 commit comments

Comments
 (0)