Skip to content
Snippets Groups Projects
Commit 641f53bb authored by Pierre BONNEFOI's avatar Pierre BONNEFOI
Browse files

Issue #3005314 by pbonnefoi, jastraat, Pranali.addweb, Soubi: in_array()...

Issue #3005314 by pbonnefoi, jastraat, Pranali.addweb, Soubi: in_array() expects parameter 2 to be array, null given
parent 99dd066d
No related branches found
No related tags found
2 merge requests!7Merge last commits from 8.x-2.x into 3.0.x,!5Issue #3005314: add control for type array to prevent php8 error
......@@ -120,9 +120,11 @@ function auto_entityqueue_get_queues_by_type_and_bundle($type, $bundle) {
$queues = EntityQueue::loadMultipleByTargetType($type);
foreach ($queues as $queue) {
$entity_settings = $queue->getEntitySettings();
if (in_array($bundle, $entity_settings['handler_settings']['target_bundles']) // Check bundle.
&& (isset($entity_settings['handler_settings']['auto_entityqueue']['auto_add'])
&& $entity_settings['handler_settings']['auto_entityqueue']['auto_add']) // Check if auto add is enabled.
if (isset($entity_settings['handler_settings']['target_bundles'])
&& is_array($entity_settings['handler_settings']['target_bundles'])
&& in_array($bundle, $entity_settings['handler_settings']['target_bundles']) // Check bundle.
&& isset($entity_settings['handler_settings']['auto_entityqueue']['auto_add'])
&& $entity_settings['handler_settings']['auto_entityqueue']['auto_add'] // Check if auto add is enabled.
&& $queue->status() // Check if queue is enabled.
) {
$target_queues[] = $queue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment