Check if post is array before checking if key exists in preset
This commit is contained in:
@@ -228,7 +228,7 @@ class SP_Admin_Sports {
|
||||
$post_array['post_type'] = $post_type;
|
||||
|
||||
// Add post excerpt
|
||||
if ( array_key_exists( 'description', $post ) ) {
|
||||
if ( is_array( $post ) && array_key_exists( 'description', $post ) ) {
|
||||
$post_array['post_excerpt'] = $post['description'];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user