Skip to content

Commit

Permalink
Added back-up tool fix
Browse files Browse the repository at this point in the history
  • Loading branch information
condor2 authored Feb 24, 2024
1 parent b1e65fe commit 4c18d68
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions upload/admin/model/tool/backup.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,7 @@ public function backup(array $tables): string {

foreach (array_values($result) as $value) {
if ($value !== null) {
$value = str_replace(["\x00", "\x0a", "\x0d", "\x1a"], ['\0', '\n', '\r', '\Z'], $value);
$value = str_replace(["\n", "\r", "\t"], ['\n', '\r', '\t'], $value);
$value = str_replace('\\', '\\\\', $value);
$value = str_replace('\'', '\\\'', $value);
$value = str_replace('\\\n', '\n', $value);
$value = str_replace('\\\r', '\r', $value);
$value = str_replace('\\\t', '\t', $value);
$value = str_replace(array('\\', "\x00", "\n", "\r", "\x1a", '\'', '"'), array('\\\\', '\0', '\n', '\r', '\Z', '\\\'', '\"'), $value);
$values .= '\'' . $value . '\', ';
} else {
$values .= 'NULL, ';
Expand Down

0 comments on commit 4c18d68

Please sign in to comment.