- Some more documentation made / fixed
This commit is contained in:
1 parent
46535c2734
commit
58f73d914b
9 files changed
+49
-41
No files matched your search
@@ -20,7 +20,7 @@ class JsonExtension implements Extension, FunctionExtension {
|
||||
break;
|
||||
|
||||
case "json.html":
|
||||
return "<?php echo htmlentities(json_encode($arguments, {$this->flags}), ENT_QUOTES, 'UTF-8') ?>";
|
||||
return "<?php echo htmlentities(json_encode($arguments, $flag), ENT_QUOTES, 'UTF-8') ?>";
|
||||
}
|
||||
|
||||
$cls = static::class;
|
||||
@@ -32,7 +32,7 @@ class JsonExtension implements Extension, FunctionExtension {
|
||||
{
|
||||
return [
|
||||
'json' => function($arguments, ? int $flags = null) {
|
||||
return json_encode($arguments, \JSON_FORCE_OBJECT);
|
||||
return json_encode($arguments, $flags ?? $this->flags);
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user