Fixed errors if storing serializes objects
authorAlexander Ebert <ebert@woltlab.com>
Tue, 11 Oct 2011 18:44:02 +0000 (20:44 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 11 Oct 2011 18:44:02 +0000 (20:44 +0200)
wcfsetup/install/files/lib/system/package/PackageInstallationFormManager.class.php

index 6468bf7b672a704841fad848aa8aa97e71da00c5..4273618b9dfc99f3dded9cb2d74ad8482137befd 100644 (file)
@@ -85,7 +85,7 @@ abstract class PackageInstallationFormManager {
                $statement->execute(array(
                        $queue->queueID,
                        $document->getName(),
-                       serialize($document)
+                       base64_encode(serialize($document))
                ));
        }
        
@@ -102,7 +102,7 @@ abstract class PackageInstallationFormManager {
                                AND formName = ?";
                $statement = WCF::getDB()->prepareStatement($sql);
                $statement->execute(array(
-                       serialize($document),
+                       base64_encode(serialize($document)),
                        $queue->queueID,
                        $document->formName
                ));
@@ -140,7 +140,7 @@ abstract class PackageInstallationFormManager {
                $row = $statement->fetchArray();
                
                if ($row) {
-                       $document = unserialize($row['document']);
+                       $document = unserialize(base64_decode($row['document']));
                        return $document;
                }