One line incompatible with PHP version less than 7.0
Closed this issue · 1 comments
donatasben commented
Hi. I uploaded my PW site to a client server that was running older PHP version and SeoMaestro threw a 500 server error. Error log showed an issue:
Parse Error: syntax error, unexpected '?' (line 211 of /site/modules/SeoMaestro/src/SeoDataBase.php)
Which is return $defaultConfig[$key] ?? null;
So the ??
is the only thing that stops SeoMaestro from working in older PHP versions.
I suggest changing it to "old-school" return isset($defaultConfig[$key]) ? $defaultConfig[$key] : null;
donatasben commented
Never mind, it was SeoMaestro version 0.8. If I want to update, I have to run PHP 7.0..