For some reason the option to suppress Admin Notices wasn’t working. Based on the code below I was able to stop them from printing. I traced the messages to wp-dbmanager.php, line 153. My change and the original below.
Modified check which appears to work:
if( isset( $backup_options[‘hide_admin_notices’] ) || intval( $backup_options[‘hide_admin_notices’] ) === 1 )
Original:
if( ! isset( $backup_options[‘hide_admin_notices’] ) || intval( $backup_options[‘hide_admin_notices’] ) === 0 )
For a moment I thought that is a bug in the code but when I tried a brand new install of WP with DBManager 2.75. I am able to surpress the warning just fine.
I suspect there’s a difference in compiler precedence at play. I changed the statement again. I added additional parenthesis so that the result of both logical statements is negated, not just the result of isset. This change worked on my system and has the benefit that it doesn’t actually change your code so much as instruct the compiler on precedence.
My change:
if( ! (isset( $backup_options[‘hide_admin_notices’] ) || intval( $backup_options[‘hide_admin_notices’] ) === 0 ))
Original:
if( ! isset( $backup_options[‘hide_admin_notices’] ) || intval( $backup_options[‘hide_admin_notices’] ) === 0 )
I’m running Windows Server 2012 R2 with IIS 8.5. I used the Microsoft Web Platform Installer 5.0 to install WordPress 4.1.1. The Installer installs PHP 5.4.24 by default.
So that’s my environment. Sorry – I’m from that dang Windows world.
I appreciate that you looked at my post. Hopefully, I’ve given something back.
Thanks for sharing nevertheless @planettao. I also appreciate your detailed reply which is rare here!