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"
CommentFileSizeAuthor
#1 839366-context-strict-checking.patch965 bytesjelenex
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jelenex’s picture

This is because Context API uses non-strict equality checking and assumes that the 'value' argument isn't supplied when in fact it is.

yhahn’s picture

Version: 6.x-3.0-beta5 » 6.x-3.x-dev
Assigned: Unassigned » yhahn
Priority: Normal » Critical
yhahn’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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