|
@@ -284,7 +284,7 @@ class Str
|
|
|
}
|
|
|
public static function val($show, $data = [], $state = false)
|
|
|
{
|
|
|
- if ($data && strpos($show, '{') !== false && strpos($show, '{"') === false) {
|
|
|
+ if (is_array($data) && strpos($show, '{') !== false && strpos($show, '{"') === false) {
|
|
|
$func = function ($r) use ($data) {
|
|
|
if (isset($data[$r[1]])) {
|
|
|
return $data[$r[1]];
|