• Resolved cybergirl

    (@cybergirl)


    I’m upgrading php 5.6. to php 7.0 on the server. For some WP projects I’m having the following errors when I scan with php compatibility tool. How to fix ? WP version is latest, plugin version is 5.0.6.

    FILE: /wp-content/plugins/xml-sitemap-feed/models/public/sitemap-news.php
    ————————————————————————————————————————
    FOUND 1 ERROR AFFECTING 1 LINE
    ————————————————————————————————————————
    57 | ERROR | Using ‘break’ outside of a loop or switch structure is invalid and will throw a fatal error since PHP 7.0
    ————————————————————————————————————————

    FILE: /wp-content/plugins/xml-sitemap-feed/models/public/shared.php
    ————————————————————————————————————————-
    FOUND 1 ERROR AFFECTING 1 LINE
    ————————————————————————————————————————-
    117 | ERROR | Using ‘break’ outside of a loop or switch structure is invalid and will throw a fatal error since PHP 7.0
    ————————————————————————————————————————-

Viewing 4 replies - 1 through 4 (of 4 total)
  • Strange warnings… both those breaks are inside a foreach loop so there is no problem.

    The plugin has been tested on PHP 7.0 and 7.2 and should cause no errors. But if you do find any, please let me know ??

    Thread Starter cybergirl

    (@cybergirl)

    Sorry I’m not a coder, I’m a server admin. Before I move my customers projects to the new server I was using WP php compatibility plugin to check for possible errors and these I had.

    No problem, I understand the concern!

    I think I found out why the compatibility checker made the mistaken warning so I’ll try to prevent that for a future release. Thanks for pointing it out ??

    Thread Starter cybergirl

    (@cybergirl)

    Hi, thank you for your feedback.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘php 7.0 warnings’ is closed to new replies.