• I was using WP_CLI to update a bunch of posts unrelated to my site’s podcast when I continuously received this warning:

    Warning: Undefined array key "wsl-sab-nonce" in /srv/htdocs/wp-content/plugins/smart-app-banner/wsl-smart-app-banner.php on line 544

    It came from line 544 inwsl-smart-app-banner.php:

    if ( ! wp_verify_nonce( $_POST['wsl-sab-nonce'], plugin_basename( __FILE__ ) ) ) {

    I changed it to this, and the error went away:

    if ( ! isset( $_POST['wsl-sab-nonce'] ) || ! wp_verify_nonce( $_POST['wsl-sab-nonce'], plugin_basename( __FILE__ ) ) ) {
Viewing 1 replies (of 1 total)
  • Plugin Author stephend

    (@stephend)

    Thanks for your feedback. Yes, it looks like a bug and your fix appears to be sensible. (Actually, there’s a fix for it in the master branch… but now that I look at it, I realise that it’s not correct.)

    I’ll try to update the plugin when I get the chance. Unless you have set PHP to treat warnings as errors, it’s benign.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.