error display: strcmp() expects parameter 2 to be string, object given
file in /app/vendor/yiisoft/yii2/helpers/BaseHtml.php line 1913
POST value = "1"
//vendor/pheme/yii2-settings/models/BaseSetting.php
if ($type !== null) {
$model->type = $type;
} else {
$t = gettype($value);
if ($t == 'string') {//t = "string" - this is correct
$error = false;
try {
Json::decode($value);//value "1" decode in 1
} catch (InvalidParamException $e) {
$error = true;
}
if (!$error) {//if success decode and $t = "object" - wtf!!!???
$t = 'object';
}
}
$model->type = $t;
}
error display: strcmp() expects parameter 2 to be string, object given file in /app/vendor/yiisoft/yii2/helpers/BaseHtml.php line 1913 POST value = "1"