[CONTROLLER][UserPanel] Fix 'could not convert IntergetType to string' error
This commit is contained in:
parent
1abd28c949
commit
d5e6fd603d
@ -166,7 +166,7 @@ class UserPanel extends Controller
|
|||||||
foreach ($columns as $name => $col) {
|
foreach ($columns as $name => $col) {
|
||||||
$type = $col->getType();
|
$type = $col->getType();
|
||||||
$val = $type->convertToPHPValue($col->getDefault(), $platform);
|
$val = $type->convertToPHPValue($col->getDefault(), $platform);
|
||||||
$type_str = lcfirst(mb_substr((string) $type, 1));
|
$type_str = $type->getName();
|
||||||
$label = str_replace('_', ' ', ucfirst($name));
|
$label = str_replace('_', ' ', ucfirst($name));
|
||||||
|
|
||||||
$labels = [
|
$labels = [
|
||||||
@ -198,8 +198,8 @@ class UserPanel extends Controller
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// @codeCoverageIgnoreStart
|
// @codeCoverageIgnoreStart
|
||||||
throw new ServerException(_m('Internal server error'));
|
|
||||||
Log::critical("Structure of table user_notification_prefs changed in a way not accounted to in notification settings ({$name}): " . $type_str);
|
Log::critical("Structure of table user_notification_prefs changed in a way not accounted to in notification settings ({$name}): " . $type_str);
|
||||||
|
throw new ServerException(_m('Internal server error'));
|
||||||
// @codeCoverageIgnoreEnd
|
// @codeCoverageIgnoreEnd
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user