summaryrefslogtreecommitdiff
path: root/controllers
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2017-10-08 15:52:42 -0700
committerAaron Parecki <aaron@parecki.com>2017-10-08 15:52:42 -0700
commitffb3011eeb8620fde05c7893d2fe98d3d1ae0bb3 (patch)
tree40bf0a66c4c192416b11651306ae7c00e67d86a9 /controllers
parentdb65ef5b5d9b979d4a15bef6b54227904119ef66 (diff)
convert all values to arrays for html editor
Diffstat (limited to 'controllers')
-rw-r--r--controllers/editor.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/controllers/editor.php b/controllers/editor.php
index ddffccb..f813f9e 100644
--- a/controllers/editor.php
+++ b/controllers/editor.php
@@ -55,6 +55,11 @@ $app->post('/editor/publish', function() use($app) {
'type' => ['h-entry'],
'properties' => $micropub_request
];
+ // Convert all values to arrays
+ foreach($micropub_request['properties'] as $k=>$v) {
+ if(!is_array($v))
+ $micropub_request['properties'][$k] = [$v];
+ }
}
$r = micropub_post_for_user($user, $micropub_request, null, $json);