Unless I'm mistaken, the string filter operator 'Is not empty (NULL)' should read 'Is not empty (NOT NULL)'...

Made a patch if that is indeed the case.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

i think the NULL is the description for empty and not for not empty,
but i'm not native

BWPanda’s picture

Category: bug » task
Status: Active » Needs review
FileSize
734 bytes

In that case, maybe it should be 'Is not empty/NULL'... Patch attached.

dawehner’s picture

As I said above NULL is just a description for EMPTY.

with / some people may see a difference in their php brain.

empty(0) <=> TRUE
0 === NULL <=> FALSE

But this is not php its sql :)

merlinofchaos’s picture

I like (NOT NULL) but I just noticed that there are at least 4 occurances of the string that all need to be caught:

handlers/views_handler_filter_in_operator.inc:          'title' => t('Is not empty (NULL)'),
handlers/views_handler_filter_string.inc:          'title' => t('Is not empty (NULL)'),
handlers/views_handler_filter_many_to_one.inc:          'title' => t('Is not empty (NULL)'),
handlers/views_handler_filter_numeric.inc:          'title' => t('Is not empty (NULL)'),
BWPanda’s picture

FileSize
2.34 KB

Here's an updated patch for the latest 2.x-dev:

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

I'm now convinced. This string makes more sense.

merlinofchaos’s picture

Status: Reviewed & tested by the community » Fixed

Committed to all 3 branches. Thanks!

Status: Fixed » Closed (fixed)

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