Update: Fatal Error
-
Update caused fatal error: Can’t return function value.
Mine was found in:wp-content\plugins\wp-database-backup\includes\admin\Destination\Dropbox\Dropbox_upload.php
line 11I had to remove wp database backup completely to fix the issue.
-
Please, help me too!The same mistake, what to do?
Hi,
Apologies for facing issue with update.
Issue has been fixed in V.4.5.1
Download latest version and let me know in case any issue.
(Update caused fatal error: Can’t return function value Dropbox_upload.php)
how i can make this? i dont know how to do it, maybe you can correct code on the 11 line?
<?php
add_action(‘wp_db_backup_completed’, array(‘WPDBBackupDropbox’, ‘wp_db_backup_completed’));class WPDBBackupDropbox
{public static function wp_db_backup_completed(&$args)
{
include plugin_dir_path(__FILE__) . ‘DropboxClient.php’;
$dropbox = new WPDBBackup_Destination_Dropbox_API(‘dropbox’);
$dropboxtoken = !empty(get_option(‘wpdb_dropboxtoken’)) ? maybe_unserialize(get_option(‘wpdb_dropboxtoken’)) : array();
if (!empty($dropboxtoken[‘access_token’])) {
$dropbox->setOAuthTokens($dropboxtoken);
$wpdb_dropbbox_dir=!empty(get_option(‘wpdb_dropbbox_dir’)) ? ‘/’.get_option(‘wpdb_dropbbox_dir’).’/’ : ”;
$response = $dropbox->upload($args[1], $wpdb_dropbbox_dir . $args[0]);
if ($response)
$args[2] = $args[2] . “<br> Upload Database Backup on Dropbox”;
}}
}
Hi,
I have corrected code and push updated code or wordpress org.
Please reinstall plugin or update plugin on your site.
Let me know in case any issue.
Sorry sir, I can’t update plugin , I can only recorrect code in database, can you write or show new 11 line so I copy and inserted it into my database. I will be very grateful
Hi,
Replace function wp_db_backup_completed
Path : wp-content\plugins\wp-database-backup\includes\admin\Destination\Dropbox\Dropbox_upload.phppublic static function wp_db_backup_completed(&$args)
{
include plugin_dir_path(__FILE__) . ‘DropboxClient.php’;
$dropbox = new WPDBBackup_Destination_Dropbox_API(‘dropbox’);
$wpdb_dropboxtoken=get_option(‘wpdb_dropboxtoken’);
$dropboxtoken = (!empty($wpdb_dropboxtoken)) ? maybe_unserialize($wpdb_dropboxtoken) : array();
if (isset($dropboxtoken[‘access_token’]) && !empty($dropboxtoken[‘access_token’])) {
$dropbox->setOAuthTokens($dropboxtoken);
$wpdb_dropbbox_dir=get_option(‘wpdb_dropbbox_dir’);
$wpdb_dropbbox_dir=!empty($wpdb_dropbbox_dir) ? ‘/’.get_option(‘wpdb_dropbbox_dir’).’/’ : ”;
$response = $dropbox->upload($args[1], $wpdb_dropbbox_dir . $args[0]);
if ($response)
$args[2] = $args[2] . “<br> Upload Database Backup on Dropbox”;
}}
sir, sorry, can you tell me, What encoding should I use?
and when i change , appeared a new error
Parse error: syntax error, unexpected ‘>’ in /var/www/u0262925/data/www/energo-obsled.ru/wp-content/plugins/wp-database-backup/includes/admin/Destination/Dropbox/Dropbox_upload.php on line 19
Hi,
you can comment code line no 18 and 19.
(wp-content/plugins/wp-database-backup/includes/admin/Destination/Dropbox/Dropbox_upload.php)№18 if ($response)
№19 $args[2] = $args[2] . “<br> Upload Database Backup on Dropbox”;Replace function wp_db_backup_completed (comment line 18,18)
Path : wp-content\plugins\wp-database-backup\includes\admin\Destination\Dropbox\Dropbox_upload.phppublic static function wp_db_backup_completed(&$args)
{
include plugin_dir_path(__FILE__) . ‘DropboxClient.php’;
$dropbox = new WPDBBackup_Destination_Dropbox_API(‘dropbox’);
$wpdb_dropboxtoken=get_option(‘wpdb_dropboxtoken’);
$dropboxtoken = (!empty($wpdb_dropboxtoken)) ? maybe_unserialize($wpdb_dropboxtoken) : array();
if (isset($dropboxtoken[‘access_token’]) && !empty($dropboxtoken[‘access_token’])) {
$dropbox->setOAuthTokens($dropboxtoken);
$wpdb_dropbbox_dir=get_option(‘wpdb_dropbbox_dir’);
$wpdb_dropbbox_dir=!empty($wpdb_dropbbox_dir) ? ‘/’.get_option(‘wpdb_dropbbox_dir’).’/’ : ”;
$response = $dropbox->upload($args[1], $wpdb_dropbbox_dir . $args[0]);
//if ($response)
//$args[2] = $args[2] . “<br> Upload Database Backup on Dropbox”;
}}
i just change all code for your new code, and site are work it, but with errors
At the top appeared a line with the code, the plugin deactivated, ty so much sir!!!Hi,
Can you share your site details on walke.prashant28@gmail.com or raise ticket on http://www.wpseeds.com/support so that i can check exact issue.
The topic ‘Update: Fatal Error’ is closed to new replies.