Warning: uasort() expects parameter 1 to be array when no search results are returned

Created on 9 April 2015, over 9 years ago
Updated 4 July 2023, over 1 year ago

Ok an issue on a very old version, but perhaps someone runs into this as well.

When you use ds_search and no search results are returned then line 259 of ds_search tries to do a node_view_multiple on an empty results array. This results in:

Warning: uasort() expects parameter 1 to be array, null given in node_view_multiple() (regel 2680 van /home/johnny/workspace/quadrupal7/modules/node/node.module).

Next comment contains a patch which solves this.

🐛 Bug report
Status

RTBC

Version

1.9

Component

Code

Created by

🇳🇱Netherlands Johnny vd Laar

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • 🇧🇾Belarus alena_stanul

    It seems that the ds-results_null_fix-2468303-4.patch is incorrect. An addition of code elseif ($results) {is meaningless before foreach ($results as $id => $result) {.

Production build 0.71.5 2024