Prevent some more errors and warnings
This commit is contained in:
parent
38d862a152
commit
b901244d56
1 changed files with 2 additions and 2 deletions
|
@ -19,7 +19,7 @@ function agarica_preprocess_node(&$variables) {
|
|||
$allowed_regions = ['secondary_menu'];
|
||||
agarica_add_regions_to_node($allowed_regions, $variables);
|
||||
}
|
||||
$field_body_paragraph = $variables['elements']['field_body_paragraph'];
|
||||
$field_body_paragraph = $variables['elements']['field_body_paragraph'] ?? NULL;
|
||||
if (isset($field_body_paragraph)) {
|
||||
$max_key = max(array_map('intval', array_keys($field_body_paragraph)));
|
||||
for ($i = 0; $i <= $max_key; $i++) {
|
||||
|
@ -106,7 +106,7 @@ function agarica_languague_switch_link() {
|
|||
unset($links[$current_language]);
|
||||
|
||||
// Check if the current path display an entity.
|
||||
$entity = FALSE;
|
||||
$entity = [];
|
||||
foreach (\Drupal::routeMatch()->getParameters() as $param) {
|
||||
if ($param instanceof EntityInterface) {
|
||||
$entity[] = $param;
|
||||
|
|
Loading…
Reference in a new issue