Skip to content

Commit

Permalink
clickable() triggers error if argument is not stdClass
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Mar 6, 2013
1 parent 23dac74 commit 2425744
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/twitter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ public function cachedRequest($resource, array $data = NULL, $cacheExpire = NULL
public static function clickable($status)
{
if (!is_object($status)) { // back compatibility
trigger_error(__METHOD__ . '() has been changed; pass as parameter status object, not just text.', E_USER_WARNING);
return preg_replace_callback(
'~(?<!\w)(https?://\S+\w|www\.\S+\w|@\w+|#\w+)|[<>&]~u',
array(__CLASS__, 'clickableCallback'),
Expand Down

0 comments on commit 2425744

Please sign in to comment.