{"id":16150618,"date":"2022-10-31T19:53:06","date_gmt":"2022-10-31T19:53:06","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/error-that-switches-theme-to-default\/"},"modified":"2022-10-31T19:54:16","modified_gmt":"2022-10-31T19:54:16","slug":"error-that-switches-theme-to-default","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/error-that-switches-theme-to-default\/","title":{"rendered":"Error that switches theme to default"},"content":{"rendered":"<p>Hello! I installed Neve on my site but encountered a problem: every 60 minutes WordPress automatically deactivates the theme and replaces it with the default one. If I try removing the following code:<\/p>\n<pre><code>function _neve_bootstrap_errors() {\nglobal $_neve_bootstrap_errors;\nprintf( &#039;&lt;div class=&quot;notice notice-error&quot;&gt;&lt;p&gt;%1$s&lt;\/p&gt;&lt;\/div&gt;&#039;, $_neve_bootstrap_errors-&gt;get_error_message() ); \/\/ phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n}\n\nif ( $_neve_bootstrap_errors-&gt;has_errors() ) {\n\/**\n* Add notice for PHP upgrade.\n*\/\nadd_filter( &#039;template_include&#039;, &#039;__return_null&#039;, 99 );\nswitch_theme( WP_DEFAULT_THEME );\nunset( $_GET[&#039;activated&#039;] ); \/\/ phpcs:ignore WordPress.Security.NonceVerification.Recommended\nadd_action( &#039;admin_notices&#039;, &#039;_neve_bootstrap_errors&#039; );\n\nreturn;\n}<\/code><\/pre>\n<p>from functions.php, I get the following error message in the WordPress error log:<\/p>\n<p><code>PHP Fatal error: Cannot use isset() on the result of an expression (you can use &quot;null !== expression&quot; instead) in \/home\/silvinab\/public_html\/wp-content\/themes\/neve\/globals\/utilities.php on line 554<\/code><\/p>\n<p>Can you please advise how to fix this?<\/p>\n<p>If you need information on the PHP install and setup, it&#8217;s available <a href=\"http:\/\/silvina-bg.com\/p.php\" rel=\"noopener\" target=\"_blank\">here<\/a>.<\/p>\n","protected":false},"template":"","class_list":["post-16150618","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16150618","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16150618\/revisions"}],"predecessor-version":[{"id":16150621,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16150618\/revisions\/16150621"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=16150618"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}