Fix class Object\Item not found in Object\Post
This commit is contained in:
parent
4b0f83a12b
commit
79ed1568b6
|
@ -90,7 +90,7 @@ class Item extends BaseObject
|
||||||
}
|
}
|
||||||
|
|
||||||
$item['pagedrop'] = $data['pagedrop'];
|
$item['pagedrop'] = $data['pagedrop'];
|
||||||
$child = new Item($item);
|
$child = new Post($item);
|
||||||
$this->addChild($child);
|
$this->addChild($child);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -472,14 +472,14 @@ class Item extends BaseObject
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function addChild(Item $item)
|
public function addChild(Post $item)
|
||||||
{
|
{
|
||||||
$item_id = $item->getId();
|
$item_id = $item->getId();
|
||||||
if (!$item_id) {
|
if (!$item_id) {
|
||||||
logger('[ERROR] Item::addChild : Item has no ID!!', LOGGER_DEBUG);
|
logger('[ERROR] Post::addChild : Item has no ID!!', LOGGER_DEBUG);
|
||||||
return false;
|
return false;
|
||||||
} elseif ($this->getChild($item->getId())) {
|
} elseif ($this->getChild($item->getId())) {
|
||||||
logger('[WARN] Item::addChild : Item already exists ('. $item->getId() .').', LOGGER_DEBUG);
|
logger('[WARN] Post::addChild : Item already exists ('. $item->getId() .').', LOGGER_DEBUG);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user