plugin php error "Warning: Creating default object in…"
-
A plugin I have (wp-veriteco-timeline) is causing this error when I hit Publish on its Custom Post Type BUT it IS saving the Featured Image and content.
“Warning: Creating default object from empty value in /…/wp-content/plugins/wp-veriteco-timeline/wp-veriteco-timeline.php on line 60”
“Warning: Cannot modify header information – headers already sent by (output started at /…/wp-content/plugins/wp-veriteco-timeline/wp-veriteco-timeline.php:60) in /…/wp-admin/post.php on line 197”
Anyone see anything wrong with this code as regards WP?
$thumbnail_id = get_post_thumbnail_id( $this->post_id ); if( $thumbnail_id ) { // if there is featured image $img = wp_get_attachment_image_src( $thumbnail_id, 'full' ); $thumbnail_image = get_post( $thumbnail_id, 'OBJECT' ); if ($thumbnail_image && isset($thumbnail_image)) { $this->asset->media = $img[0]; $this->asset->caption = $thumbnail_image->post_excerpt; } } else if( $meta['wpvt_video'][0] ) { // otherwise, look for youtube link $this->asset->media = $meta['wpvt_video'][0]; $this->asset->caption = $meta['wpvt_video_caption'][0]; }Thanks for anyone’s help.
GN
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘plugin php error "Warning: Creating default object in…"’ is closed to new replies.