Hi ๐
Today we are getting the following error.
Notice: Trying to get property ‘term_id’ of non-object in /nas/content/live/test/wp-content/plugins/download-manager/src/Package/Shortcodes.php on line 172
The code part it refers to is:
/**
* Convert slugs to ID
*/
foreach ($categories as &$cat) {
if (!is_numeric($cat) && $cat !== ”) {
$catObj = get_term_by(‘slug’, $cat, ‘wpdmcategory’);
$cat = $catObj->term_id;
}
Line 72 is the last line.
Any ideas on what we should do to fix this? Thanks!