{"id":3464126,"date":"2013-02-13T02:43:25","date_gmt":"2013-02-13T02:43:25","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/patch-undefined-variable-r\/"},"modified":"2016-08-20T21:34:06","modified_gmt":"2016-08-20T21:34:06","slug":"patch-undefined-variable-r","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/patch-undefined-variable-r\/","title":{"rendered":"[PATCH] Undefined variable: $r"},"content":{"rendered":"<p>In some posts I get the following warning with WP_DEBUG turned on:<\/p>\n<blockquote>\n<p>Notice: Undefined variable: r in \/path\/to\/wp-content\/plugins\/better-related\/inc\/frontend.php on line 169<\/p>\n<\/blockquote>\n<p>Method get_the_related() should either define $r at the top and use $r .= everywhere else or change<br \/>\n<code>return $r;<\/code><br \/>\nto<br \/>\n<code>return isset($r) ? $r : &#039;&#039;;<\/code><br \/>\nat the end of the function.<\/p>\n<p>https:\/\/wordpress.org\/extend\/plugins\/better-related\/<\/p>\n","protected":false},"template":"","class_list":["post-3464126","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3464126","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\/3464126\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=3464126"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}