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.

CommentFileSizeAuthor
node_17.patch599 byteskilles@www.drop.org

Comments

Steven’s picture

Version: 4.5.0-rc »

Applied to cvs head and 4.5. Thanks.

Anonymous’s picture