I’ve a customized put up sort referred to as tasks, and its archive is at /tasks, on the archive web page I get notices Discover: Making an attempt to get property of non-object each time I attempt to entry the $put up i.e. $post->post_name. Is that this supposed behaviour? Ought to I simply settle for that and all the time examine the provision of $put up earlier than utilizing it?
if (!empty($put up)) {
// Do one thing with $put up
}

