Hi,

In your string_equal access plugin, in the ctools_string_equal_ctools_access_check function, you perfom this check :

(ctools/plugins/access/string_equal.inc line 53)


if (empty($context) || empty($context->data)) {

$string = '';

}
else {

$string = $context->data;

}

But, when $context->data is equal to '0', the empty test return true and the '0' is overwrite with ''.

This can be solved simply by replacing


empty($context->data)

with


$context->data === null

Thank you !

Comments

merlinofchaos’s picture

That doesn't quite work, as comparing directly to NULL could cause a notice if there is no member there. We should use isset() instead of empty() though.

epieddy’s picture

Yes indeed. I didn't know that in some case, $context->data doesn't exist.

So, ok, isset() is a better solution.

Ashlar’s picture

Status: Active » Closed (won't fix)

This bug report has not been active for over six months. In an effort to clean-up the issue queue this item has been closed. If your modules are current and the report is still relevant please feel free to change the Status back to active.