Skip to content

Commit

Permalink
form raw
Browse files Browse the repository at this point in the history
  • Loading branch information
asika32764 committed Dec 9, 2023
1 parent 8d057fc commit 519306c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
use Windwalker\Utilities\Options\OptionAccessTrait;
use Windwalker\Utilities\Symbol;
use Windwalker\Utilities\TypeCast;
use Windwalker\Utilities\Wrapper\RawWrapper;

/**
* The Form class.
Expand Down Expand Up @@ -202,6 +203,10 @@ public function fill(mixed $data, bool $decodeJson = true): static
$data = Arr::mapRecursive(
$data,
static function ($value) {
if ($value instanceof RawWrapper) {
return $value();
}

if (is_string($value) && is_json($value)) {
try {
return json_decode($value, true, 512, JSON_THROW_ON_ERROR);
Expand Down

0 comments on commit 519306c

Please sign in to comment.