Notice: Trying to get property of non-object in /home/thegundu/public_html/wp-content/plugins/the-events-calendar/lib/tribe-templates.class.php on line 688
I am getting this error at the top of the page when I attempt to submit a new created ninja form. I went to the PHP file and looked at the code, I just don’t have the skill to understand what the possible break is. Here is the code from the PHP file:
* convert the post_date_gmt to the event date for feeds
*
* @param $time the post_date
* @param $d the date format to return
* @param $gmt whether this is a gmt time
*
* @return int|string
*/
public static function event_date_to_pubDate( $time, $d, $gmt ) {
global $post;
if ( $post->post_type == TribeEvents::POSTTYPE && is_feed() && $gmt ) {
$time = tribe_get_start_date( $post->ID, false, $d );
$time = mysql2date( $d, $time );
}
return $time;
}