Skip to content
Snippets Groups Projects
Commit 364322c4 authored by Youri van Koppen's avatar Youri van Koppen
Browse files

Issue #3217262 by megachriz: Avoid usage of array_flip() in FeedType::__sleep().

parent 7bea6300
No related branches found
No related tags found
1 merge request!198Avoid usage of array_flip().
Pipeline #327645 passed
...@@ -215,9 +215,10 @@ class FeedType extends ConfigEntityBundleBase implements FeedTypeInterface, Enti ...@@ -215,9 +215,10 @@ class FeedType extends ConfigEntityBundleBase implements FeedTypeInterface, Enti
// \Drupal\Core\Entity\EntityType instance which can contain a // \Drupal\Core\Entity\EntityType instance which can contain a
// stringTranslation object that is not serializable. // stringTranslation object that is not serializable.
// @see https://www.drupal.org/project/drupal/issues/2893029 // @see https://www.drupal.org/project/drupal/issues/2893029
$vars = array_flip($vars); $key = array_search('pluginCollection', $vars);
unset($vars['pluginCollection']); if ($key !== FALSE) {
$vars = array_flip($vars); unset($vars[$key]);
}
return $vars; return $vars;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment