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.
You are not logged in.
Pages: 1
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
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
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
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
Pages: 1