Page 1 of 1

PHP 7.4 related bug

Posted: 11 Dec 2019, 14:44
by ulfklose
I setup X3 with the demo content and while I was going through the examples I noticed that most of the thumbnails only showed text. The following content was displayed:

Trying to access array offset on value of type null

And a reference to app/parsers/slir/slirrequest.class.php on line 526. I googled the error which led me to the assumption that the error was PHP 7.4 related (because of this: https://github.com/composer/composer/issues/8324). I switched from 7.4 to 7.3 and it worked.

Re: PHP 7.4 related bug

Posted: 11 Dec 2019, 23:30
by mjau-mjau
Indeed there seems to be a "strict" warning being reported in PHP 7.4. For those who want to hotfix this issue (and use PHP 7.4) before it's fixed in next X3 release, you can open the fileĀ /app/parsers/slir/slirrequest.class.php in any text editor and locate line 526:
Code
if ($this->cropRatio['width'] !== NULL && $this->cropRatio['height'] !== NULL)
Change it to:
Code
if ($this->cropRatio && $this->cropRatio['width'] !== NULL && $this->cropRatio['height'] !== NULL)
I will update this in next X3 release.

Re: PHP 7.4 related bug

Posted: 28 Mar 2020, 21:42
by mjau-mjau
This issue is resolved in latestĀ X3.28.0 release, which includes fixes for PHP 7.4.