Aqua-Resizer icon indicating copy to clipboard operation
Aqua-Resizer copied to clipboard

Notice: Trying to access array offset on value of type bool in

Open mazur27 opened this issue 4 years ago • 6 comments

I am getting this error on my site.

Notice: Trying to access array offset on value of type bool in /homepages/6/d22556011/htdocs/clickandbuilds/HomeOfficeToGo/wp-content/themes/configurator/framework/plugins/aq_resizer.php on line 115

Notice: Trying to access array offset on value of type bool in /homepages/6/d22556011/htdocs/clickandbuilds/HomeOfficeToGo/wp-content/themes/configurator/framework/plugins/aq_resizer.php on line 116

The code on line 115, 116 is:

            $dst_w = $dims[4];
            $dst_h = $dims[5];

Thanks in advance!

mazur27 avatar Aug 31 '20 10:08 mazur27

This throws an error in Latest PHP Versions. For PHP versions < 7 you can also use a ternary statement

$dst_w = isset($dims[4]) ? $dims[5] : ''; $dst_h = isset($dims[5]) ? $dims[5] : '';

AivahThemes avatar Nov 27 '20 21:11 AivahThemes

Same issue for me. Is this resolved for you? Ok it seems that the above answer resolves it. I wonder why he wrote < 7 instead of > 7, though. Moreover I modified to: "? $dims[4]" in the first statement.

Garavani avatar Dec 29 '20 13:12 Garavani

This throws an error in Latest PHP Versions. For PHP versions < 7 you can also use a ternary statement

$dst_w = isset($dims[4]) ? $dims[5] : ''; $dst_h = isset($dims[5]) ? $dims[5] : '';

should be:

$dst_w = isset($dims[4]) ? $dims[4] : '';
$dst_h = isset($dims[5]) ? $dims[5] : '';

epagecity avatar Apr 19 '21 19:04 epagecity