Commit 36c1fe66 authored by catch's avatar catch
Browse files

Issue #3460513 by nishtha.pradhan, Berdir: Avoid TypeError if config entity dependencies are NULL

(cherry picked from commit 26684ff0)
parent 135b0ee7
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -376,7 +376,7 @@ public function __sleep() {
  public function calculateDependencies() {
    // All dependencies should be recalculated on every save apart from enforced
    // dependencies. This ensures stale dependencies are never saved.
    $this->dependencies = array_intersect_key($this->dependencies, ['enforced' => '']);
    $this->dependencies = array_intersect_key($this->dependencies ?? [], ['enforced' => '']);
    if ($this instanceof EntityWithPluginCollectionInterface) {
      // Configuration entities need to depend on the providers of any plugins
      // that they store the configuration for.