PHP Fatal Error in cache.php on line 123 $wp_object_cache is non-object
Indeed, you have to be careful when using __destruct. This is a special function that fires when the object is about to be destroyed. When PHP calls exit (as wp_send_json() does), we do not control in what order PHP will destroy the objects. So __destruct is very dangerous when it relies on other classes. I’ve … Read more