Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
ulfklose
Experienced
Topic Author
Posts: 47
Joined: 10 Dec 2019, 09:10

PHP 7.4 related bug

11 Dec 2019, 14:44

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.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12195
Joined: 30 Sep 2006, 03:37

Re: PHP 7.4 related bug

11 Dec 2019, 23:30

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.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12195
Joined: 30 Sep 2006, 03:37

Re: PHP 7.4 related bug

28 Mar 2020, 21:42

This issue is resolved in latest X3.28.0 release, which includes fixes for PHP 7.4.