Permalink
Browse files

clickable() triggers error if argument is not stdClass

  • Loading branch information...
1 parent 23dac74 commit 2425744d2cc93960f16b2e5739cd978df8defe59 @dg committed Mar 6, 2013
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/twitter.class.php
@@ -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'),

0 comments on commit 2425744

Please sign in to comment.