{"id":19036990,"date":"2026-10-05T16:46:05","date_gmt":"2026-10-05T16:46:05","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/fatal-error-for-version-4-0-in-resizer-index-php\/"},"modified":"2026-10-05T16:46:05","modified_gmt":"2026-10-05T16:46:05","slug":"fatal-error-for-version-4-0-in-resizer-index-php","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/fatal-error-for-version-4-0-in-resizer-index-php\/","title":{"rendered":"Fatal error for version 4.0 in resizer\/index.php"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Just upgraded to version 4.0 of this plugin and got this fatal error:<br \/><br \/>PHP Fatal error: Uncaught Error: Cannot unset offset in a non-array variable in &lt;webtree&gt;\/wp-content\/plugins\/better-image-sizes\/resizer\/index.php:503<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It looks like the 4.0 code is trying to unset a variable that maybe doesn&#8217;t exist &#8211; here&#8217;s line 503:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>                    unset( $attr&#091;'retina'] );<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Line 491 does do an isset() check, but line 503 doesn&#8217;t, so maybe it should read:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>if( isset( $attr&#091;'retina'] ) { unset( $attr&#091;'retina'] ); }<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-19036990","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19036990","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\/19036990\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=19036990"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}