forked from GNUsocial/gnu-social
Better handling of multiple objects
This commit is contained in:
parent
04f6e4ce7b
commit
2ad5aece55
@ -375,11 +375,12 @@ class Activity
|
|||||||
|
|
||||||
// object
|
// object
|
||||||
|
|
||||||
if (count($this->objects) > 1) {
|
if (count($this->objects) == 0) {
|
||||||
common_log(LOG_WARNING, "Ignoring extra objects in JSON output for activity " . $this->id);
|
|
||||||
} else if (count($this->objects == 0)) {
|
|
||||||
common_log(LOG_ERR, "Can't save " . $this->id);
|
common_log(LOG_ERR, "Can't save " . $this->id);
|
||||||
} else {
|
} else {
|
||||||
|
if (count($this->objects) > 1) {
|
||||||
|
common_log(LOG_WARNING, "Ignoring " . (count($this->objects) - 1) . " extra objects in JSON output for activity " . $this->id);
|
||||||
|
}
|
||||||
$object = $this->objects[0];
|
$object = $this->objects[0];
|
||||||
|
|
||||||
if ($object instanceof Activity) {
|
if ($object instanceof Activity) {
|
||||||
|
Loading…
Reference in New Issue
Block a user