{"id":4281305,"date":"2013-11-02T22:55:41","date_gmt":"2013-11-02T22:55:41","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/minor-code-bugs\/"},"modified":"2016-08-21T12:11:41","modified_gmt":"2016-08-21T12:11:41","slug":"minor-code-bugs","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/minor-code-bugs\/","title":{"rendered":"Minor code bugs"},"content":{"rendered":"<p>A few minor code fixes that I put in to make it work with no errors that I thought I would share back here. They may not be an issue for everyone but I was getting errors.<\/p>\n<p>in responsive-image-polyfill.php from line 357, change the if statement to check if $format-&gt;fallback exists rather than just looking for a truthy value to stop the undefined value error:<\/p>\n<pre><code>\/\/ Add the fallback, if requested\nif($format-&gt;fallback)<\/code><\/pre>\n<p>becomes:<\/p>\n<pre><code>\/\/ Add the fallback, if requested\nif(isset($format-&gt;fallback))<\/code><\/pre>\n<p>This one was odd though because it only happened on some installs &#8211; still, can&#8217;t hurt.<\/p>\n<p>line 64 of config.php I got a deprecated function warning on<br \/>\n<code>$value = mysql_escape_string($value);<\/code><br \/>\nso updated it to:<br \/>\n<code>$value = mysql_real_escape_string($value);<\/code><\/p>\n<p>https:\/\/wordpress.org\/plugins\/pb-responsive-images\/<\/p>\n","protected":false},"template":"","class_list":["post-4281305","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/4281305","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\/4281305\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=4281305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}