mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 06:56:05 +00:00
type fixes
This commit is contained in:
@@ -457,6 +457,7 @@ class Email extends Database implements
|
||||
$entity->get('parentId') &&
|
||||
$entity->isAttributeChanged('parentId')
|
||||
) {
|
||||
/** @var \Espo\ORM\Collection<EmailEntity> */
|
||||
$replyList = $this->findRelated($entity, 'replies');
|
||||
|
||||
foreach ($replyList as $reply) {
|
||||
|
||||
@@ -85,6 +85,7 @@ class Import extends Database
|
||||
return $query;
|
||||
}
|
||||
|
||||
/** @var \Espo\ORM\Query\SelectBuilder */
|
||||
$builder = $this->entityManager->getQueryBuilder()->clone($query);
|
||||
|
||||
$builder->join(
|
||||
|
||||
@@ -146,7 +146,9 @@ class Preferences implements Repository,
|
||||
return;
|
||||
}
|
||||
|
||||
/** @var array<string,array<string,mixed>> */
|
||||
$fields = $this->metadata->get('entityDefs.Preferences.fields');
|
||||
|
||||
$defaults = [];
|
||||
|
||||
$dashboardLayout = $this->config->get('dashboardLayout');
|
||||
|
||||
@@ -34,6 +34,7 @@ use Espo\ORM\Entity;
|
||||
use Espo\Core\Exceptions\Error;
|
||||
use Espo\Core\Exceptions\Conflict;
|
||||
use Espo\Core\Repositories\Database;
|
||||
use Espo\Core\Utils\Json;
|
||||
|
||||
use Espo\Repositories\UserData as UserDataRepository;
|
||||
use Espo\Entities\UserData;
|
||||
@@ -104,7 +105,7 @@ class User extends Database
|
||||
if ($user) {
|
||||
$this->entityManager->getLocker()->rollback();
|
||||
|
||||
throw new Conflict(json_encode(['reason' => 'userNameExists']));
|
||||
throw new Conflict(Json::encode(['reason' => 'userNameExists']));
|
||||
}
|
||||
} else {
|
||||
if ($entity->isAttributeChanged('userName')) {
|
||||
@@ -127,7 +128,7 @@ class User extends Database
|
||||
if ($user) {
|
||||
$this->entityManager->getLocker()->rollback();
|
||||
|
||||
throw new Conflict(json_encode(['reason' => 'userNameExists']));
|
||||
throw new Conflict(Json::encode(['reason' => 'userNameExists']));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user