Send "type" as array for JSON requests
authorAaron Parecki <aaron@parecki.com>
Wed, 22 Mar 2017 18:46:42 +0000 (11:46 -0700)
committerChristian Weiske <cweiske@cweiske.de>
Thu, 23 Mar 2017 06:41:06 +0000 (07:41 +0100)
e.g. `{"type":["h-entry"], ... }`

https://www.w3.org/TR/micropub/#json-syntax

src/shpub/Request.php

index 32e25de04d290d42e6a94b408e728242b3afd87a..8262863d7ce3500c30b03d3edfdffb17a9d55f70 100644 (file)
@@ -56,7 +56,7 @@ class Request
                 $data['url'] = $this->url;
             }
             if ($this->type !== null) {
                 $data['url'] = $this->url;
             }
             if ($this->type !== null) {
-                $data['type'] = 'h-' . $this->type;
+                $data['type'] = array('h-' . $this->type);
             }
             if (count($this->properties)) {
                 $data['properties'] = $this->properties;
             }
             if (count($this->properties)) {
                 $data['properties'] = $this->properties;