fix notices
This commit is contained in:
@@ -95,7 +95,7 @@ class Base
|
||||
if (!empty($params['where']) && is_array($params['where'])) {
|
||||
$where = array();
|
||||
|
||||
foreach ($params['where'] as $item) {
|
||||
foreach ($params['where'] as $item) {
|
||||
if ($item['type'] == 'boolFilters' && !empty($item['value']) && is_array($item['value'])) {
|
||||
foreach ($item['value'] as $filter) {
|
||||
$p = $this->getBoolFilterWhere($filter);
|
||||
@@ -183,7 +183,7 @@ class Base
|
||||
$d = array();
|
||||
foreach ($fieldList as $field) {
|
||||
if (
|
||||
strlen($item['value']) >= self::MIN_LENGTH_FOR_CONTENT_SEARCH
|
||||
strlen($value) >= self::MIN_LENGTH_FOR_CONTENT_SEARCH
|
||||
&&
|
||||
!empty($fieldDefs[$field]['type']) && $fieldDefs[$field]['type'] == 'text'
|
||||
) {
|
||||
|
||||
@@ -84,6 +84,9 @@ class Stream extends \Espo\Core\Hooks\Base
|
||||
$scopeNotifiedList = array();
|
||||
foreach ($linkDefs as $link => $defs) {
|
||||
if ($defs['type'] == 'belongsTo') {
|
||||
if (empty($defs['foreign']) || empty($defs['entity'])) {
|
||||
continue;
|
||||
}
|
||||
$foreign = $defs['foreign'];
|
||||
$scope = $defs['entity'];
|
||||
$entityId = $entity->get($link . 'Id');
|
||||
@@ -96,6 +99,9 @@ class Stream extends \Espo\Core\Hooks\Base
|
||||
}
|
||||
} else if ($defs['type'] == 'belongsToParent') {
|
||||
$foreign = $defs['foreign'];
|
||||
if (empty($defs['foreign'])) {
|
||||
continue;
|
||||
}
|
||||
$scope = $entity->get($link . 'Type');
|
||||
$entityId = $entity->get($link . 'Id');
|
||||
if (!empty($scope) && !empty($entityId)) {
|
||||
@@ -107,6 +113,9 @@ class Stream extends \Espo\Core\Hooks\Base
|
||||
|
||||
}
|
||||
} else if ($defs['type'] == 'hasMany') {
|
||||
if (empty($defs['foreign']) || empty($defs['entity'])) {
|
||||
continue;
|
||||
}
|
||||
$foreign = $defs['foreign'];
|
||||
$scope = $defs['entity'];
|
||||
$entityIds = $entity->get($link . 'Ids');
|
||||
|
||||
@@ -70,6 +70,8 @@ class Stream extends \Espo\Core\Services\Base
|
||||
'container',
|
||||
);
|
||||
|
||||
protected $auditedFieldsCache = array();
|
||||
|
||||
protected function getServiceFactory()
|
||||
{
|
||||
return $this->injections['container']->get('serviceFactory');
|
||||
|
||||
Reference in New Issue
Block a user