I'm making a custom Wordpress theme. At some point, the "Customize" page in the admin panel has completely broken, giving me tons of these errors:
Notice: Trying to get property 'post_status' of non-object in /var/www/html/wp-admin/includes/template.php on line 2233 Notice: Trying to get property 'post_status' of non-object in /var/www/html/wp-admin/includes/template.php on line 2237 Notice: Trying to get property 'post_status' of non-object in /var/www/html/wp-admin/includes/template.php on line 2243 Notice: Trying to get property 'post_status' of non-object in /var/www/html/wp-admin/includes/template.php on line 2247 Notice: Trying to get property 'ID' of non-object in /var/www/html/wp-admin/includes/template.php on line 2251 Notice: Trying to get property 'post_status' of non-object in /var/www/html/wp-admin/includes/template.php on line 2255 Notice: Trying to get property 'ID' of non-object in /var/www/html/wp-admin/includes/template.php on line 2260 Notice: Trying to get property 'ID' of non-object in /var/www/html/wp-admin/includes/template.php on line 2264 Notice: Trying to get property 'ID' of non-object in /var/www/html/wp-admin/includes/template.php on line 2269
My page seems to work just fine otherwise, I don't get any warnings anywhere else.
How do I even begin to debug this?