Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Merge requests
!2048
Issue
#3180227
: Notice: Trying to access array offset on value of type null in Drupal\views\Plugin\views\display\EntityReference->query()
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
Issue
#3180227
: Notice: Trying to access array offset on value of type null in Drupal\views\Plugin\views\display\EntityReference->query()
issue/drupal-3180227:3180227-notice-trying-to
into
9.4.x
Overview
0
Commits
2
Pipelines
0
Changes
2
Closed
Hoi Sing Edison Wong
requested to merge
issue/drupal-3180227:3180227-notice-trying-to
into
9.4.x
3 years ago
Overview
0
Commits
2
Pipelines
0
Changes
2
Expand
0
0
Merge request reports
Compare
9.4.x
version 2
46df49ac
2 years ago
version 1
28729337
3 years ago
9.4.x (base)
and
latest version
latest version
7e14e779
2 commits,
2 years ago
version 2
46df49ac
2 commits,
2 years ago
version 1
28729337
1 commit,
3 years ago
2 files
+
29
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
core/modules/views/src/Plugin/views/display/EntityReference.php
+
12
−
1
Options
@@ -155,7 +155,18 @@ public function query() {
$id_table
=
$this
->
view
->
storage
->
get
(
'base_table'
);
$this
->
id_field_alias
=
$this
->
view
->
query
->
addField
(
$id_table
,
$id_field
);
$options
=
$this
->
getOption
(
'entity_reference_options'
);
$options
=
$this
->
getOption
(
'entity_reference_options'
)
??
[];
// The entity_reference_options are typically set during a call to
// Drupal\views\Plugin\EntityReferenceSelection\ViewsSelection::initializeView().
// If any entity_reference_options are not yet set, we apply the same
// default values that would typically be added by that method.
$default_options
=
[
'match'
=>
NULL
,
'match_operator'
=>
'CONTAINS'
,
'limit'
=>
0
,
'ids'
=>
NULL
,
];
$options
+=
$default_options
;
// Restrict the autocomplete options based on what's been typed already.
if
(
isset
(
$options
[
'match'
]))
{
Loading