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.

CommentFileSizeAuthor
tweetment.module.patch503 bytesDustin Currie

Comments

Dustin Currie’s picture

I mis-typed the above array.
I don't understand why this is happening.

  $arr = array('a' => 1, 'b' => 2, 'c' =>  3);
  print var_dump(in_array('c', $arr)); //does return false as expected.

However, line 48 in tweetmeme.module in your release still always returns true on my site and I don't know why.

robloach’s picture

in_array actually checks against the value, not the key ;-) . array_key_exists checks the keys. Hmmm, I'm experiencing this as well.

robloach’s picture

Status: Needs review » Fixed

The 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?

Status: Fixed » Closed (fixed)

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