Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2018-01-31 23:22:47

ciwir
Member
From: Hornówek, Poland
Registered: 2013-06-06
Posts: 27
Website

PHP 7.2

Hi
I just wanted to changephp version on my server to 7.2 but i get this error on backlight admin login page

Something went wrong
count(): Parameter must be an array or an object that implements Countable in SimpleHTMLTag.php on line 44

on PHP 7.1.12 it is ok .... when you will add support fot PHP 7.2 to Backlight >?

Offline

#2 2018-02-01 05:12:38

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: PHP 7.2

Thanks for the heads-up. I’ll look into this. PHP is a moving target. They change the behaviour on point releases, and hosts prematurely update to the latest version. After fixing this we’ll look to specify a current upper limit for supported PHP version in Backlight.

Offline

#3 2018-02-01 06:22:25

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: PHP 7.2

I haven't yet been able to test against PHP 7.2, as my development and test platform does not provide PHP beyond version 7.1.

This particular line wasn't written as it should have been and has been like that for a few years, right back to CE4.  Only PHP 7.2 raises it as an error.  Whether it should be is arguable.

I'll put a hot fix in our Backlight code.  In the mean time, making this edit should fix it.  Changing line 44 in backlight/framework/helpers/SimpleHTMLTag.php from this:

if (count($matches == 3)) {

to this:

if (count($matches) == 3) {

Offline

#4 2018-02-13 11:55:37

tmszewczuk
Member
From: Fairfield Glade, TN USA
Registered: 2015-06-14
Posts: 61
Website

Re: PHP 7.2

Thanks much! That did the trick. I changed the server  php version back to 7.1 (from 7.2) and made the file mods suggested fixeing the problem.


Thomas Szewczuk
Website  TestSite Admin-email
'The nation which forgets its defenders will be itself forgotten - Calvin Coolidge, 1923 - 1929'

Offline

Board footer

Powered by FluxBB