Skip to content
Snippets Groups Projects
Commit cd3acb69 authored by Adil Siddiqui's avatar Adil Siddiqui Committed by Adriano
Browse files

Issue #3343093 by Adil_Siddiqui, AbhinavK: in_array(): Argument #2 ($haystack)...

Issue #3343093 by Adil_Siddiqui, AbhinavK: in_array(): Argument #2 ($haystack) must be of type array, null given in in_array()
parent 56e2b69d
No related branches found
No related tags found
No related merge requests found
......@@ -140,7 +140,7 @@ function prevnext_node_view(array &$build, Node $node, EntityViewDisplayInterfac
function prevnext_node_presave(EntityInterface $entity) {
$config = \Drupal::config('prevnext.settings');
$enabled_nodetypes = $config->get('prevnext_enabled_nodetypes');
if (in_array($entity->bundle(), $enabled_nodetypes)) {
if (is_array($enabled_nodetypes) && in_array($entity->bundle(), $enabled_nodetypes)) {
// We are saving a node of a type with prevnext enabled, so invalidate
// all cached rendered output of other nodes of this type with our tag.
Cache::invalidateTags(['prevnext-' . $entity->bundle()]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment