backwpup icon indicating copy to clipboard operation
backwpup copied to clipboard

PHP Notice: Undefined index: dbdumpdbcharset

Open lucspe opened this issue 5 years ago • 0 comments

Hi,

Thank you for the great plugin and all your efforts.

Since 3.6.9, BackWPup fills the error log with this notice:

Undefined index: dbdumpdbcharset in /wordpress-install/wp-content/plugins/backwpup/inc/class-job.php on line 2087

(Replace "wordpress-install" with actual root path).

The issue has been reported on WordPress forums for over a year by several users (https://wordpress.org/support/topic/php-notice-undefined-index-dbdumpdbcharset/).

It is rather annoying and pollutes the log file.

I took a quick look at it and it seems that the error is reported at line 2087 of class-job.php, specifically when you populate the “manifest” array, here is the piece of code:

// Add job settings
        $manifest['job_settings'] = array(
            'dbdumptype' => $this->job['dbdumptype'],
            'dbdumpfile' => $this->job['dbdumpfile'],
            'dbdumpfilecompression' => $this->job['dbdumpfilecompression'],
            'dbdumpdbcharset' => $this->job['dbdumpdbcharset'],
            'type' => $this->job['type'],
            'destinations' => $this->job['destinations'],
            'backuptype' => $this->job['backuptype'],
            'archiveformat' => $this->job['archiveformat'],
            'dbdumpexclude' => $this->job['dbdumpexclude'],

        );

However - unless I am mistaken - dbdumpdbcharset doesn’t seem to be defined anywhere in the plugin and this is what causes the notice.

Looking at history of class-job.php, it seems that this change has been introduced in 3.6.9.

Hope this helps getting the issue resolved.

lucspe avatar May 26 '20 07:05 lucspe