Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
b03932be
Commit
b03932be
authored
May 12, 2015
by
xjm
Browse files
Issue
#2457427
by Crell: Bad error handling of invalid Entity definition
parent
bfdcc65a
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/lib/Drupal/Core/Entity/EntityManager.php
View file @
b03932be
...
...
@@ -478,7 +478,7 @@ protected function buildBaseFieldDefinitions($entity_type_id) {
foreach
(
array_intersect_key
(
$keys
,
array_flip
([
'id'
,
'revision'
,
'uuid'
,
'bundle'
]))
as
$key
=>
$field_name
)
{
if
(
!
isset
(
$base_field_definitions
[
$field_name
]))
{
throw
new
\
LogicException
(
SafeMarkup
::
format
(
'The @field field definition does not exist and it is used as @key entity key.'
,
array
(
'@field'
=>
$
base_field_definitions
[
$field_name
]
->
getLabel
()
,
'@field'
=>
$
field_name
,
'@key'
=>
$key
,
)));
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment