prestoav Posted April 20 Posted April 20 PW 3.0.255 ProcessDatabaseBackups 0.0.6 PHP 8.3.30 On restore I am seeing this error: Passing null to parameter #1 ($num) of type float is deprecated in ***/site/modules/ProcessDatabaseBackups/ProcessDatabaseBackups.module on line 243 The line in question seems to be this one: $this->tdSort($file['numInserts'], number_format($file['numInserts'])), Within: foreach($backupFiles as $id => $file) { $numFiles++; $numTables = $file['numTables']; if($numTables && !count($file['tables'])) $numTables .= " " . $this->_('(all)'); $basename = $file['basename']; $time = $file['time'] ? $file['time'] : $file['mtime']; if($file['description']) $basename .= '*'; $actions = array(); foreach($this->getFileActions($file) as $action) { $actions[] = $this->aTooltip($action['href'], wireIconMarkup($action['icon'], 'fw'), $action['label']); } $checkbox->attr('id', "delete_" . $sanitizer->fieldName($id)); $checkbox->attr('value', $id); $table->row(array( $this->nowrap($basename) => "./info/?id=$id", $this->tdSort(strtotime($time), wireRelativeTimeStr($time, true)), $this->nowrap($numTables), $this->tdSort($file['numInserts'], number_format($file['numInserts'])), $this->tdSort($file['size'], wireBytesStr($file['size'])), $this->nowrap(implode(' ', $actions)), $checkbox->render(), )); } If anyone has an ideas for a fix please do let me know as I use this module a lot!
poljpocket Posted Monday at 10:53 PM Posted Monday at 10:53 PM (edited) Looking through the code quickly tells me that the restore script probably isn't very resilient for missing information. Did you also create the backup file using the same module? If yes, can you check if you have a line # {some JSON content} at the very end of your SQL file? Nonetheless, you are just experiencing a warning. The backup should run just fine, or no? Edited Monday at 10:54 PM by poljpocket
prestoav Posted Tuesday at 01:53 PM Author Posted Tuesday at 01:53 PM Hi @poljpocket and thanks for your response. I did make the backup with the same module as you suggest. The is JSON content at the end of the file as follows: # --- /WireDatabaseBackup {"numTables":140,"numCreateTables":140,"numInserts":19412,"numSeconds":1}
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now