• Resolved mupic

    (@waldub)


    
    Warning:  count(): Parameter must be an array or an object that implements Countable in ...\wp-content\plugins\wp-rest-cache\includes\caching\class-caching.php on line 714
    Fatal error:  Uncaught Error: Cannot use object of type WP_Term as array in ...\wp-content\plugins\wp-rest-cache\includes\caching\class-caching.php:714
    Stack trace:
    #0 ...\wp-content\plugins\wp-rest-cache\includes\caching\class-caching.php(591): WP_Rest_Cache_Plugin\Includes\Caching\Caching->determine_object_type(Array)
    #1 ...\wp-content\plugins\wp-rest-cache\includes\caching\class-caching.php(130): WP_Rest_Cache_Plugin\Includes\Caching\Caching->register_endpoint_cache('e7df5ea64a70d54...', Array, '/wordpress/wp-j...')
    #2 ...\wp-content\plugins\wp-rest-cache\includes\api\class-endpoint-api.php(153): WP_Rest_Cache_Plugin\Includes\Caching\Caching->set_cache('e7df5ea64a70d54...', Array, 'endpoint', '/wordpress/wp-j...')
    #3 ...\wp-includes\class-wp-hook.php(286): WP_Rest_Cache_Plugin\Includes\API in ...\wp-content\plugins\wp-rest-cache\includes\caching\class-caching.php on line 714
    

    I tried to get this (…/extended/v1/menus/header_menu):

    
    object(WP_Term)#4181 (11) {
    	["term_id"]=>
    	int(848999)
    	["name"]=>
    	string(23) "Main munu"
    	["slug"]=>
    	string(67) "main-menu"
    	["term_group"]=>
    	int(0)
    	["term_taxonomy_id"]=>
    	int(848999)
    	["taxonomy"]=>
    	string(8) "nav_menu"
    	["description"]=>
    	string(0) ""
    	["parent"]=>
    	int(0)
    	["count"]=>
    	int(7)
    	["filter"]=>
    	string(3) "raw"
    	["items"]=>
    	array(5) {
    		[0]=>
    		&object(stdClass)#4183 (17) {
    			["ID"]=>
    			int(181235)
    			["post_content"]=>
    			string(0) ""
    			["post_title"]=>
    			string(14) "Home"
    			["post_excerpt"]=>
    			string(0) ""
    			["comment_status"]=>
    			string(6) "closed"
    			["post_name"]=>
    			string(8) "home"
    			["menu_order"]=>
    			int(1)
    			["comment_count"]=>
    			string(1) "0"
    			["menu_item_parent"]=>
    			string(1) "0"
    			["type"]=>
    			string(6) "custom"
    			["type_label"]=>
    			string(37) ""
    			["title"]=>
    			string(14) ""
    			["url"]=>
    			string(24) ""
    			["attr_title"]=>
    			string(0) ""
    			["description"]=>
    			string(0) ""
    			["classes"]=>
    			array(1) {
    				[0]=>
    				string(0) ""
    			}
    			["items"]=>
    			array(0) {
    			}
    		}
    	}
    }
    
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Fatal error: Uncaught Error: Cannot use object of type WP_Term as array’ is closed to new replies.