Merge pull request #287 from kadimi/patch-20
Verify get_terms result is an array before foreach
This commit is contained in:
@@ -569,6 +569,9 @@ class SP_Event extends SP_Custom_Post{
|
||||
),
|
||||
),
|
||||
) );
|
||||
if ( ! is_array( $duties ) ) {
|
||||
return array();
|
||||
}
|
||||
|
||||
if ( ! $include_empty && empty( $duties ) ) return null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user