wanze / SeoMaestro

🧙‍♂️A ProcessWire module helping you to manage SEO related tasks like a boss.
MIT License
34 stars 9 forks source link

One line incompatible with PHP version less than 7.0 #21

Closed donatasben closed 4 years ago

donatasben commented 4 years ago

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 4 years ago

Never mind, it was SeoMaestro version 0.8. If I want to update, I have to run PHP 7.0..