Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When I search (with both the apachesolr and ds_search modules enabled) I get:
Strict warning: Creating default object from empty value in ds_search_search_page() (line 301 of ds_search.module).
This error only occurs when users are in the search results.
The attached patch seems to fix the warnings, but definitely needs review from someone who knows what they're doing. I just generated it with git show HEAD on my local repo, let me know if I need to do something else to get a usable format - but it's a very tiny change.
Comment | File | Size | Author |
---|---|---|---|
#4 | fix-user-warnings-2184367-4.patch | 516 bytes | erangakm |
stop-complaints-on-users.patch | 482 bytes | George Bills |
Comments
Comment #1
rwam CreditAttribution: rwam commentedThanks,
that's help a lot. I use ds_search to render Profiles from Profile2. And I must use the following lines to avoid all warnings:
It works.
Ciao
Ralf
Comment #2
Christopher Riley CreditAttribution: Christopher Riley commentedThanks for the patch would like to see this committed.
Comment #3
aspilicious CreditAttribution: aspilicious commentedAssigning to swentel because he knows ds_search better than I do. If this throws warnings at the moment why does the user search work than?
Comment #4
erangakm CreditAttribution: erangakm commentedAttaching an apply-able patch for the same file as #1