Trying to get property of non-object in geodir_count_functions.php on line 200

This topic contains 3 replies, has 2 voices, and was last updated by  Paolo 9 years, 8 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #35664

    rosarnach
    Expired Member
    Post count: 71

    Hi guys!

    I’m getting the following error on all the posts on my site:

    Notice: Trying to get property of non-object in /homepages/18/d255072590/htdocs/clickandbuilds/TheCeliacScene/wp-content/plugins/geodir_location_manager/geodir_count_functions.php on line 200

    An example is:

    http://theceliacscene.ca/more-starbucks-gluten-free-treats-offered/

    Everything else is working fine.

    Line 200 is the third if line below.

    
    
    function gd_get_terms($arr,$tax,$args){
    
    if(isset($args['gd_no_loop'])){return $arr;}// so we don't do an infinit loop
    
    	if(!empty($arr)){
    		$term_count = geodir_get_loc_term_count('term_count');
    
    		foreach ($arr as $term) {
    			if (isset($term_count[$term->term_id])) {
    				$term->count = $term_count[$term->term_id];
    			}
    		}
    	}
    
    	return $arr;
    }

    Any suggestions?

    #35708

    Paolo
    Site Admin
    Post count: 31206

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #35718

    rosarnach
    Expired Member
    Post count: 71

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #35719

    Paolo
    Site Admin
    Post count: 31206

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

Viewing 4 posts - 1 through 4 (of 4 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount