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 using Context API I noticed that it's impossible to set attribute value to zero.
For example:
context_set('test-ns', 'test-attr', 0);
print context_get('test-ns', 'test-attr'); // "1"
Comment | File | Size | Author |
---|---|---|---|
#1 | 839366-context-strict-checking.patch | 965 bytes | jelenex |
Comments
Comment #1
jelenex CreditAttribution: jelenex commentedThis is because Context API uses non-strict equality checking and assumes that the 'value' argument isn't supplied when in fact it is.
Comment #2
yhahn CreditAttribution: yhahn commentedComment #3
yhahn CreditAttribution: yhahn commentedThanks. Fixed: http://drupal.org/cvs?commit=399604