Search Replace DBがエラーで動かない

この記事は約2分で読めます。
スポンサーリンク

WordPressのお引越しで活躍する、Search Replace DB。
こちらを実行させようとすると以下のように出てしまう。

The script encountered an error while running an AJAX request.If you are using your hosts file to map a domain try browsing via the IP address directly.If you are still running into problems we recommend trying the CLI script bundled with this package.See the README for details.

こういった現象は、PHP7.3より発生するようになった。
現象の理由としては、continueはbreakと同等のため、breakが推奨となり、warningがメッセージとして上部に出たことが問題だ。

解決策:warningの記述を消す
エラー出力の設定を変更
continueの記述をbreakに変更

この二つのうちどちらかを実行すれば動作するはず。

参考
https://morikun-taiyaki.com/wordpress-local-copy#toc15
https://kin29.info/php7-3%E3%81%8B%E3%82%89break%E3%81%AE%E4%BB%A3%E3%82%8F%E3%82%8A%E3%81%ABcountinue%E3%82%92%E4%BD%BF%E3%81%86%E3%81%A8warning%E3%81%AB%E3%81%AA%E3%82%8B%E3%80%82/

コメント

タイトルとURLをコピーしました