$in_reply_to_status_id_str = NULL;
$in_reply_to_user_id_str = NULL;
$in_reply_to_screen_name = NULL;
- if ($lastwall['parent']!=$lastwall['id']) {
+ if (intval($lastwall['parent']) != intval($lastwall['id'])) {
$in_reply_to_status_id= intval($lastwall['parent']);
$in_reply_to_status_id_str = (string) intval($lastwall['parent']);
}
}
+ // There seems to be situation, where both fields are identical:
+ // https://github.com/friendica/friendica/issues/1010
+ // This is a bugfix for that.
+ if (intval($in_reply_to_status_id) == intval($lastwall['id'])) {
+ logger('api_status_show: this message should never appear: id: '.$lastwall['id'].' similar to reply-to: '.$in_reply_to_status_id, LOGGER_DEBUG);
+ $in_reply_to_status_id = NULL;
+ $in_reply_to_user_id = NULL;
+ $in_reply_to_status_id_str = NULL;
+ $in_reply_to_user_id_str = NULL;
+ $in_reply_to_screen_name = NULL;
+ }
+
$status_info = array(
'text' => trim(html2plain(bbcode(api_clean_plain_items($lastwall['body']), false, false, 2, true), 0)),
'truncated' => false,