Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/AppFramework/Db/Entity.php')
-rw-r--r--lib/public/AppFramework/Db/Entity.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/public/AppFramework/Db/Entity.php b/lib/public/AppFramework/Db/Entity.php
index 89e8f69859e..a059e3a27b0 100644
--- a/lib/public/AppFramework/Db/Entity.php
+++ b/lib/public/AppFramework/Db/Entity.php
@@ -120,6 +120,10 @@ abstract class Entity {
if (!$args[0] instanceof \DateTime) {
$args[0] = new \DateTime($args[0]);
}
+ } elseif ($type === 'json') {
+ if (!is_array($args[0])) {
+ $args[0] = json_decode($args[0], true);
+ }
} else {
settype($args[0], $type);
}