interconnectit/Search-Replace-DB

Incompatibility with PHP7.3

gfobe opened this issue · 3 comments

gfobe commented

If I use the tool with PHP7.3 I got PHP warning and the replacement is not working correctly.

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in .../srdb.class.php on line 861

Luc45 commented

I face this on PHP 7.2.24 as well. The replacement does not work here, either.

gfobe commented

It's deprecated in PHP7.3 to use contine in a switch within a for and it will be an error in PHP8. I like the continue in line 861 a lot, but sadly also continue 1 will not work. So only a $doContinue = true with a if and a comment after the switch will do the magic or a more general refactoring, because I don't know why replacement is not working correctly.

I think it's error-prone, but continue 2 will work.

check out the v4 branch, we are preparing a new release.