I just now came across @rmccue's reported Core bug #28701(Deleted option is not deleted if value was ever null) in the wild, specifically here in hm-top-posts. The password had been changed for the Google Account, and so this notice was appearing on every admin page:
Top Posts by Google Analytics Error: GAPI: Failed to authenticate user. Error: "Error=BadAuthentication "
Now, this notice is stored in the option hmtp_top_posts_error_message and it is supposed to get deleted after it is shown. However, it was not getting deleted. It was persisting. It seems that the problem is that this option gets set to null at some point, and since it is an auto-loaded option (since it is not declared otherwise with add_option), any delete_option calls result in a no-op.
I don't think that these Top Posts options actually should be autoloaded, so I suggest that they get registered up-front via add_option and pass the $autoload argument as no.
I just now came across @rmccue's reported Core bug #28701(Deleted option is not deleted if value was ever null) in the wild, specifically here in
hm-top-posts. The password had been changed for the Google Account, and so this notice was appearing on every admin page:Now, this notice is stored in the option
hmtp_top_posts_error_messageand it is supposed to get deleted after it is shown. However, it was not getting deleted. It was persisting. It seems that the problem is that this option gets set to null at some point, and since it is an auto-loaded option (since it is not declared otherwise withadd_option), anydelete_optioncalls result in a no-op.I don't think that these Top Posts options actually should be autoloaded, so I suggest that they get registered up-front via
add_optionand pass the$autoloadargument asno.