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.
Problem/Motivation
Now when a sensor doesn't set the #query parameter as VerboseTableResult sets it to empty string when we check if query is empty always returns true.
Proposed resolution
We could initialize the #query to null, but as is possible that a sensor give us an empty string, I think the best option is to change the check to a !empty() instead of isset().
We have to do the same for #query_args that now works just because when we initialize it the name is incorrect.
Also we have to change that #arguments for #query_args.
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#5 | bad_check_for_query_in-2609960-5.patch | 773 bytes | edurenye |
#2 | bad_check_for_query_in-2609960-2.patch | 1.21 KB | edurenye |
Comments
Comment #2
edurenye CreditAttribution: edurenye at MD Systems GmbH commentedDone.
Comment #3
miro_dietikerCommitting this because i'm reviewing UI / UX improvements...
However, still needs work because we should add a assertNoText Query on a sensor that wrongly had it such as the user_integrity sensor.
Comment #5
edurenye CreditAttribution: edurenye at MD Systems GmbH commentedAdded tests.
Comment #6
miro_dietikerCommitted, thx.