I am gradually implementing PHP on WordPress sites that I manage, and it is very common for me to see PHP Warnings such as "PHP Warning: Undefined array key 'SOME-TERM'" tied to specific themes and plugins. Typically, I have just reported these to the developers, but in this case I am working with a plugin that is no longer being supported. I am hoping someone can help me with fixing the code on the script.
Here are the lines of code throwing off the error:
if( $class->args[ 'display_category_description' ] ){
$desc = empty( $cat->description ) ? null : $cat->description;
if( !empty( $desc ) ){
$header .= '<p class="category-description">'
. $desc .
'</p>';
}
}
I am guessing that this error is being thrown because the "category description" field is blank in some of the database entries --- but I'm not sure of the appropriate syntax to fix this.