As the title says, $element['namespace'] is sometimes and array not a single value. Which means when you array_merge on line 198 and then implode on line 201 the result is :

xmlns:dc="http://purl.org/dc/elements/1.1/" Array

This is due to the code on line 115-> 121

      foreach ($extra as $element) {
        if ($element['namespace']) {
          $namespaces[] = $element['namespace'];
        }
      }

Should be (assuming it may be an array or single value) :

      foreach ($extra as $element) {
        if(is_array($element['namespace'])) {
          foreach ($element['namespace'] as $elements_namespace) {
            $namespaces[] = $elements_namespace;
          }
        } 
        else if ($element['namespace']) {
          $namespaces[] = $element['namespace'];
        }
      }

a_c_m

Comments

gábor hojtsy’s picture

Status: Needs review » Postponed (maintainer needs more info)

When is it a single value and not an array? I believe this might be an issue in another contributed module. I did not stumble on this issue with Drupal core itself.

gábor hojtsy’s picture

Status: Postponed (maintainer needs more info) » Fixed

This was effectively dead code. The node feed called out to modules as if we are displaying a node in a feed, but we do not (before, the module did include the node as the first item in the feed, but the previous maintainer removed this functionality).

Code in 5.x-1.x and 6.x-1.x only added namespace items to the comment rss feed, but did not add anything from the node. Removed that dead functionality in new releases on 5.x-2.0 and 6.x-2.0. These are the new supported branches, with lots of other improvements.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.