Skip to content

Commit

Permalink
Json function now can be fed a json array
Browse files Browse the repository at this point in the history
  • Loading branch information
solleer committed Sep 14, 2016
1 parent 0d73d74 commit 00aa220
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/TSSFunction/Json.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public function __construct(&$baseDir) {
public function run(array $args, \DomElement $element = null) {
$json = $args[0];

if (trim($json)[0] != '{') {
if (trim($json)[0] != '{' && trim($json)[0] != '[') {
$path = $this->baseDir . $json;
if (!file_exists($path)) throw new \Exception('File does not exist at: ' . $path);
$json = file_get_contents($json);
Expand Down

0 comments on commit 00aa220

Please sign in to comment.