From 5834dd5d0425935e8bc42bc9e78e10aea75cfe6a Mon Sep 17 00:00:00 2001 From: Champ Camba Date: Thu, 15 Dec 2016 20:45:46 +0800 Subject: [PATCH] Remove notices --- core/um-actions-access.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/um-actions-access.php b/core/um-actions-access.php index 0d856d2e..11709c8f 100644 --- a/core/um-actions-access.php +++ b/core/um-actions-access.php @@ -368,9 +368,13 @@ $um_category = get_the_category(); $um_category = current( $um_category ); - $term_id = $um_category->term_id; + $term_id = ''; + + if( isset( $um_category->term_id ) ){ + $term_id = $um_category->term_id; + } - if( isset( $term_id ) ){ + if( isset( $term_id ) && ! empty( $term_id ) ){ $opt = get_option("category_$term_id");