Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
thizmo opened this issue May 7, 2018 · 4 comments
Open

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

thizmo opened this issue May 7, 2018 · 4 comments

Comments

@thizmo
Copy link

thizmo commented May 7, 2018

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)

  • Make a copy of the file
  • Find the two lines with "break" in the imdbsearch.class.php file
  • Replace it with "return false" (found as a solution on stackoverflow.com)
  • Reload the browser.

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

@pellcorp
Copy link
Owner

Can you provide the actual stack overflow url you found

Can you provide the actual log errors

@thizmo
Copy link
Author

thizmo commented May 14, 2018

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
Copy link
Owner

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

@pellcorp
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants