Bruno17 / MIGX

MIGX for revo 2.2 and above
83 stars 78 forks source link

Fix imageupload on PHP7 due to stray break statement #317

Closed Mark-H closed 5 years ago

Mark-H commented 6 years ago

This break statement was causing the following PHP error on PHP7:

PHP Fatal error: 'break' not in the 'loop' or 'switch' context in core/components/migx/model/imageupload/imageupload.php on line 197

I suspect PHP7, or perhaps some sort of opcache, does more syntax checking before executing a file than PHP5, causing the break statement to trip it up. As it's an unreachable statement following the return it should not have any side effects.

This appears to be the cause for #304 though that also mentions another issue with media source paths that I haven't identified yet.