Skip to content

Commit

Permalink
A few things to quiet PHP warnings, now that I'm using a PHP from thi…
Browse files Browse the repository at this point in the history
…s decade.
  • Loading branch information
icculus committed Jan 25, 2013
1 parent 6b13e3a commit 94a15fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion archive_tweets.php
Expand Up @@ -98,7 +98,7 @@ function append_to_already_archived($id, $alreadyarchivedfname)
$subject = str_replace("\n", ' ', $subject);
$subject = "@$screenname: $subject";

if ($isarchived[$id])
if (isset($isarchived[$id]))
{
//print("Already archived $cachefname\n");
continue; // already archived this one.
Expand Down
11 changes: 5 additions & 6 deletions cachetweets.php
Expand Up @@ -29,9 +29,9 @@
$reprocess_existing = true;
}

$connection = undef;
$statuses = undef;
$data = undef;
$connection = NULL;
$statuses = NULL;
$data = NULL;

if ($reprocess_existing)
{
Expand Down Expand Up @@ -165,7 +165,7 @@
$in_reply_to = '';
if ($tweet->in_reply_to_status_id_str)
{
if (!$in_reply_to_name)
if (!isset($in_reply_to_name))
$in_reply_to_name = $tweet->in_reply_to_screen_name;
$in_reply_to = "in reply to <a href='https://twitter.com/{$tweet->in_reply_to_screen_name}/status/{$tweet->in_reply_to_status_id_str}'>$in_reply_to_name</a>";
}
Expand All @@ -177,9 +177,8 @@
$tweet->epoch_created_at = $datetime->format('U');
$tweet->simple_created_at = $created_at;
$tweet->status_url = "https://twitter.com/{$tweet->user->screen_name}/status/{$tweet->id_str}";
if ($in_reply_to_name)
if (isset($in_reply_to_name))
$tweet->in_reply_to_name_proper = $in_reply_to_name;

if (!isset($tweet->origtext))
$tweet->origtext = $tweet->text;
$tweet->text = $text;
Expand Down

0 comments on commit 94a15fb

Please sign in to comment.