{"id":12070691,"date":"2019-10-27T22:46:11","date_gmt":"2019-10-27T22:46:11","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/bug-263\/"},"modified":"2019-10-27T22:50:29","modified_gmt":"2019-10-27T22:50:29","slug":"bug-263","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/bug-263\/","title":{"rendered":"bug"},"content":{"rendered":"<p>Hi Jean!<br \/>\nPhp 7+ is throwing a notice:<\/p>\n<p><code>PHP Notice:  Undefined offset: 0 in \/path\/to\/wp-content\/plugins\/base64-images-modified\/classes\/class-base-64-images.php on line 246<\/code><\/p>\n<p>Here:<\/p>\n<pre><code>\/\/get background-image from style\n        $tags = $doc-&gt;getElementsByTagName(&#039;div&#039;);\n        foreach ($tags as $tag) {\n            $style = $tag-&gt;getAttribute(&#039;style&#039;);\n            preg_match(&#039;\/\\(([^)]+)\\)\/&#039;, $style, $match);\n            $src = trim($match[&#039;0&#039;], &quot;&#039;()\\&quot;&quot;);\/\/ &lt;---[&#039;0&#039;] unidefined\n            $content = $this-&gt;change_source($src, $content);<\/code><\/pre>\n<p>Just thought that you should know.<br \/>\nCheers and thanks!<br \/>\n-Brian<\/p>\n","protected":false},"template":"","class_list":["post-12070691","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12070691","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":2,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12070691\/revisions"}],"predecessor-version":[{"id":12070699,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12070691\/revisions\/12070699"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=12070691"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}