Commit c09e90f0 authored by ytsurk's avatar ytsurk
Browse files

Fixes warnings on install caused by #3247415

parent b7eb4b5f
Loading
Loading
Loading
Loading
+6 −0
Changes for src/Plugin/views/filter/MediaDirectory.php: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -123,7 +123,10 @@ class MediaDirectory extends ManyToOne {
   * {@inheritdoc}
   */
  protected function valueForm(&$form, FormStateInterface $form_state) {
    $vocabulary = NULL;
    if (isset($this->options['vid'])) {
      $vocabulary = $this->vocabularyStorage->load($this->options['vid']);
    }

    if (empty($vocabulary)) {
      $settings_url = Url::fromRoute('media_directories.config_form');
@@ -362,7 +365,10 @@ class MediaDirectory extends ManyToOne {
  public function calculateDependencies() {
    $dependencies = parent::calculateDependencies();

    $vocabulary = NULL;
    if (isset($this->options['vid'])) {
      $vocabulary = $this->vocabularyStorage->load($this->options['vid']);
    }
    if ($vocabulary) {
      $dependencies[$vocabulary->getConfigDependencyKey()][] = $vocabulary->getConfigDependencyName();
    }