Support » Plugin: Awesome Support - WordPress HelpDesk & Support Plugin » PHP 7.3 warning messages

  • Hey,
    I’ve just installed your plugin and a warning message appeared:

    Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/.../public_html/wp-content/plugins/awesome-support/includes/functions-templating.php on line 694
    
    Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/.../public_html/wp-content/plugins/awesome-support/includes/class-product-sync.php on line 193
    
    Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/.../public_html/wp-content/plugins/awesome-support/includes/class-product-sync.php on line 220
    
    Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/.../public_html/wp-content/plugins/awesome-support/includes/class-product-sync.php on line 242

    Regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • yeisonbp

    (@yeisonbp)

    Hi @damonh,

    It looks like this might be a php 7.3 bug. You can find out more information in the link below:

    https://github.com/composer/composer/issues/7836

    Regards.

    Hi all,

    it is easy to blame this on PHP (and maybe it is a bug there) but it is surely easy as well to apply a workaround in the plugin code. Use a proper “break” instead of the “continue” where those cause the problem here.

    How to fix
    1. Edit file “…/awesome-support/includes/functions-templating.php”
    2. Go to line 694
    3. Replace “continue;” with “break;”
    4. Edit file “…/awesome-support/includes/class-product-sync.php”
    5. Go to line 193
    6. Remove line (there is a “break;” right underneath)
    7. Go to line 220
    8. Replace “continue;” with “break;”
    9. Go to line 242
    10. Replace “continue;” with “break;”

    That should work around this until the PHP bug is reoslved.

    Best regards,
    glewe

    • This reply was modified 1 month, 1 week ago by George Lewe.
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.