{"action":"opened","issue":{"url":"https://api.github.com/repos/easy-updates-manager/easy-updates-manager/issues/169","repository_url":"https://api.github.com/repos/easy-updates-manager/easy-updates-manager","labels_url":"https://api.github.com/repos/easy-updates-manager/easy-updates-manager/issues/169/labels{/name}","comments_url":"https://api.github.com/repos/easy-updates-manager/easy-updates-manager/issues/169/comments","events_url":"https://api.github.com/repos/easy-updates-manager/easy-updates-manager/issues/169/events","html_url":"https://github.com/easy-updates-manager/easy-updates-manager/issues/169","id":177295204,"number":169,"title":"Logs reporting successful plugin update when it actually failed","user":{"login":"jr00ck","id":3634144,"avatar_url":"https://avatars.githubusercontent.com/u/3634144?v=3","gravatar_id":"","url":"https://api.github.com/users/jr00ck","html_url":"https://github.com/jr00ck","followers_url":"https://api.github.com/users/jr00ck/followers","following_url":"https://api.github.com/users/jr00ck/following{/other_user}","gists_url":"https://api.github.com/users/jr00ck/gists{/gist_id}","starred_url":"https://api.github.com/users/jr00ck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jr00ck/subscriptions","organizations_url":"https://api.github.com/users/jr00ck/orgs","repos_url":"https://api.github.com/users/jr00ck/repos","events_url":"https://api.github.com/users/jr00ck/events{/privacy}","received_events_url":"https://api.github.com/users/jr00ck/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-15T21:31:32Z","updated_at":"2016-09-15T21:31:32Z","closed_at":null,"body":"I had a plugin update failing on a bunch of sites recently (CloudFlare 1.3.24 -> 1.3.25). The background updates email log shows this:\r\n\r\n> UPDATE LOG \r\n> ========== \r\n> \r\n> CloudFlare \r\n> ---------- \r\n> Updating plugin: CloudFlare \r\n> Downloading update from https://downloads.wordpress.org/plugin/cloudflare.1.3.25.zip... \r\n> Download failed. Not Found \r\n\r\nChecking the websites, the plugin was indeed, not updated and the background update had failed. However, your plugin logged the attempt as successful. I tracked down the issue for you:\r\n\r\nAround line 109 of \"includes/MPSUM_Logs.php\", there is this code:\r\n`$status = is_wp_error( $plugin->result ) ? 0: 1;`\r\n\r\nThe issue is that when this failure occurs, \"$plugin->result\" is not a WP error but NULL. So you need to check for that as well. It seems you solved a similar issue for themes already because that code ≈line 135 has this:\r\n`$status = ( is_wp_error( $theme->result ) || empty( $theme->result ) ) ? 0: 1;`\r\n\r\nIf you do a similar thing on the plugin code (and presumably Core and Translation sections too), that will solve the problem for this particular error.\r\n\r\nNote: I noticed when this same updated failed when doing a manual update, your logging actually caught the failure and marked it as such. That section of code was very different than the background updates logging section so that version of code also works."}}
{"actor":{"display_login":"jr00ck"}}