Closed (fixed)
Project:
TweetMeme
Version:
6.x-1.0
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Apr 2009 at 19:22 UTC
Updated:
17 May 2009 at 19:40 UTC
line 48 always returns false and shows the retweet button for all nodes.
$arr = array('a' => 1, 'b' => 2, 'c', 3);
print var_dump(in_array('c', $arr));
//returns true
print var_dump(array_search('c', $arr, true));
//returns false
Patch uses array_search instead of in_array.
| Comment | File | Size | Author |
|---|---|---|---|
| tweetment.module.patch | 503 bytes | Dustin Currie |
Comments
Comment #1
Dustin Currie commentedI mis-typed the above array.
I don't understand why this is happening.
However, line 48 in tweetmeme.module in your release still always returns true on my site and I don't know why.
Comment #2
robloachin_array actually checks against the value, not the key ;-) . array_key_exists checks the keys. Hmmm, I'm experiencing this as well.
Comment #3
robloachThe problem is that we needed to do a strict type checking. http://drupal.org/cvs?commit=206380
Mind testing 6.x-1.x-dev before I make a 6.x-1.1 release?