mirror of
https://github.com/friendica/friendica
synced 2024-12-22 22:40:16 +00:00
removing another potential way a post could have a zero parent.
This commit is contained in:
parent
60147d893c
commit
7091173131
1 changed files with 5 additions and 0 deletions
|
@ -779,6 +779,11 @@ function item_post(&$a) {
|
|||
}
|
||||
}
|
||||
|
||||
// fallback so that parent always gets set to non-zero.
|
||||
|
||||
if(! $parent)
|
||||
$parent = $post_id;
|
||||
|
||||
$r = q("UPDATE `item` SET `parent` = %d, `parent-uri` = '%s', `plink` = '%s', `changed` = '%s', `last-child` = 1, `visible` = 1
|
||||
WHERE `id` = %d LIMIT 1",
|
||||
intval($parent),
|
||||
|
|
Loading…
Reference in a new issue