Merge pull request #3811 from JustZhenya/patch-1

Fix writing non-ascii files to postgresql database
This commit is contained in:
mikeprimm 2022-07-31 12:10:48 -05:00 committed by GitHub
commit fe97e28401
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,7 +75,7 @@ function updateStandaloneFileByServerId($fname, $sid, $content)
initDbIfNeeded();
$stmt = $db->prepare('UPDATE ' . $dbprefix . 'StandaloneFiles SET Content=:content WHERE FileName=:fname AND ServerID=:sid');
$stmt->bindParam(':content', $content, PDO::PARAM_STR);
$stmt->bindParam(':content', $content, PDO::PARAM_LOB);
$stmt->bindParam(':fname', $fname, PDO::PARAM_STR);
$stmt->bindParam(':sid', $sid, PDO::PARAM_INT);
$res = $stmt->execute();