mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Prepare forward compatibility for JSON-encoded extra vars
This commit is contained in:
parent
0398b64350
commit
460736c04d
1 changed files with 8 additions and 0 deletions
|
|
@ -343,6 +343,14 @@ class Value
|
|||
{
|
||||
$values = $value;
|
||||
}
|
||||
elseif (preg_match('/^[\[\{].*[\]\}]$/', $value))
|
||||
{
|
||||
$values = json_decode($value, true);
|
||||
if (!is_array($values))
|
||||
{
|
||||
$values = [];
|
||||
}
|
||||
}
|
||||
elseif (str_contains($value, '|@|'))
|
||||
{
|
||||
$values = explode('|@|', $value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue