pellcorp / opendb

Open Media Lending Database
38 stars 24 forks source link

PHP7, Fatal error: "break" not in the loop, imdbsearch.class.php #98

Open thizmo opened 6 years ago

thizmo commented 6 years ago

Hi,

made an upgrade to latest opendb (git) and changed to PHP7.

Problem: After the upgrade, the imdbsearch got Error 500 in Browser and messages from subject in the log.

Solution:
(Quick fix only, while i am not a programmer)

After that, everything worked as expected so far. Yet i haven't fully testet everything.

pellcorp commented 6 years ago

Can you provide the actual stack overflow url you found

Can you provide the actual log errors

thizmo commented 6 years ago

Of course,

here you go. The error message (i shorted the url to the actual webspace): PHP Fatal error: 'break' not in the 'loop' or 'switch' context in /.../ht docs/opendb/lib/site/imdbphp2/imdbsearch.class.php on line 131

And the stackoverflow article: https://stackoverflow.com/questions/34871198/fatal-error-break-not-in-the-loop-or-switch-context-in The latest answer did the trick.

pellcorp commented 6 years ago

If you can raise a pull request I will merge it. I don't have time for one myself

pellcorp commented 6 years ago

There was a merge request merged mid April perhaps your issue has already been fixed seeing as it was a php 7 set of fixes