Fixed: PHP7 incompatibility in profile field BaseType

This commit is contained in:
Lucas Bartholemy 2015-12-23 02:31:01 +01:00
parent ffa8abdae0
commit 16915c9ff2

View File

@ -200,6 +200,10 @@ class BaseType extends \yii\base\Model
*/
public function loadFieldConfig()
{
if ($this->profileField->field_type_config == '') {
return;
}
$config = \yii\helpers\Json::decode($this->profileField->field_type_config);
if (is_array($config)) {
foreach ($config as $key => $value) {
@ -260,13 +264,12 @@ class BaseType extends \yii\base\Model
public function getUserValue($user, $raw = true)
{
$internalName = $this->profileField->internal_name;
if ($raw) {
return $user->profile->$internalName;
} else {
return \yii\helpers\Html::encode($user->profile->$internalName);
}
}
public function getLabels()