{"id":19039306,"date":"2026-10-07T22:38:41","date_gmt":"2026-10-07T22:38:41","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/epoch-comments-cli-error-on-line-504\/"},"modified":"2026-10-07T22:38:41","modified_gmt":"2026-10-07T22:38:41","slug":"epoch-comments-cli-error-on-line-504","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/epoch-comments-cli-error-on-line-504\/","title":{"rendered":"Epoch Comments CLI error on line 504"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">When running an unrelated WP-CLI command, I got this error:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Warning: Trying to access array offset on null in \/srv\/htdocs\/wp-content\/plugins\/rating-system\/comments.php on line 504<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To avoid it, I changed line 504 from this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$epoch_var = $epoch['options']['theme'];<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">to this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$epoch_var = (is_array($epoch) &amp;&amp; isset($epoch['options']['theme'])) ? $epoch['options']['theme'] : '';<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-19039306","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19039306","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":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19039306\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=19039306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}