diff --git a/src/wpt-functions.php b/src/wpt-functions.php index e3d7341..fca57cc 100644 --- a/src/wpt-functions.php +++ b/src/wpt-functions.php @@ -220,8 +220,13 @@ function wpt_show_last_tweet() { } else { $title = '(' . __( 'No post', 'wp-to-twitter' ) . ')'; } - $notice = esc_html( $log[1]['message'] ); - $code = esc_html( $log[1]['http'] ); + if ( is_array( $log[1] ) ) { + $notice = esc_html( $log[1]['message'] ); + $code = esc_html( $log[1]['http'] ); + } else { + $notice = esc_html( $log[1] ); + $code = ''; + } echo "
" . __( 'Last Status Update', 'wp-to-twitter' ) . ": $code
$title » $notice