The offending line is:
$request = 'http://twitter.com/friendships/create/' . (int) $id . '.' .
$this->type;
Which as you can see blindly casts to type integer something that the
comments expressly state should be a string or an int (see below). My fix
is to remove the type casting.
/**
* Sends a request to follow a user specified by ID
* @param integer|string $id The twitter ID or screenname of the user to
follow
* @param boolean $notifications Optional. If true, you will recieve
notifications from the users updates
* @return string
*/
function followUser( $id, $notifications = false )
{
if( !in_array( $this->type, array( 'xml','json' ) ) )
return false;
$request = 'http://twitter.com/friendships/create/' . (int) $id . '.' .
$this->type;
if( $notifications )
$request .= '?follow=true';
return $this->objectify( $this->process($request) );
}
Original issue reported on code.google.com by matt...@thanetstar.com on 23 Mar 2009 at 9:50
Original issue reported on code.google.com by
matt...@thanetstar.com
on 23 Mar 2009 at 9:50