In function apachesolr_search_mlt_suggestions()

this code doesn't make much sense - why end()?

    if ($response->response) {
      $docs = (array) end($response->response);
      return $docs;
    }
CommentFileSizeAuthor
#3 1609184-D6-3.patch525 bytespwolanin
#1 1609184-1.patch525 bytespwolanin

Comments

pwolanin’s picture

Status: Active » Needs review
StatusFileSize
new525 bytes
nick_vh’s picture

Version: 7.x-1.x-dev » 6.x-3.x-dev
Status: Needs review » Patch (to be ported)

Looks like a valid cleanup to me. Not sure why the previous code was so complicated to get the same result.

pwolanin’s picture

Status: Patch (to be ported) » Fixed
StatusFileSize
new525 bytes

committed to 6.x-3.x

nick_vh’s picture

Status: Fixed » Closed (fixed)