Closed (fixed)
Project:
Drupal core
Component:
node system
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
13 Oct 2004 at 22:20 UTC
Updated:
7 Jan 2005 at 07:15 UTC
Most people will expect in_array(0, array('a','b','c')) to evaluate to false, but it evaluates to true because 0 is treated as a number and the conversion of a, b, or c to a number fails. See here for more detail: http://bugs.php.net/bug.php?id=14343
If for any reason 0 should be a key in the node object than node_save will fail. Attached patch changes this by ensuring that the keys are always strings.
| Comment | File | Size | Author |
|---|---|---|---|
| node_17.patch | 599 bytes | killes@www.drop.org |
Comments
Comment #1
Steven commentedApplied to cvs head and 4.5. Thanks.
Comment #2
(not verified) commented