Hi Alan,
Thank you very much for going above and beyond and researching this for us. I wish all plugin authors were so willing to help.
Your fix worked great for my second example. However it doesn’t for the first.
Specifically, changing this:
if ( !in_array(39,get_post_ancestors($post)) && !in_array(42,get_post_ancestors($post)) ) return true;
to this:
if ( ($post) && !in_array(39,get_post_ancestors($post)) && !in_array(42,get_post_ancestors($post)) ) return true;
will get rid of the error, but now that particular widget will never show at all.
Do you have any idea why this would be?