check params to prevent PHP warnings
This commit is contained in:
parent
6b3f26202c
commit
827aacc450
1 changed files with 11 additions and 3 deletions
|
@ -47,9 +47,17 @@ class Activity {
|
||||||
|
|
||||||
public function from_post( $object ) {
|
public function from_post( $object ) {
|
||||||
$this->object = $object;
|
$this->object = $object;
|
||||||
$this->published = $object['published'];
|
if ( isset( $object['published'] ) ) {
|
||||||
$this->actor = $object['attributedTo'];
|
$this->published = $object['published'];
|
||||||
$this->id = $object['id'];
|
}
|
||||||
|
|
||||||
|
if ( isset( $object['attributedTo'] ) ) {
|
||||||
|
$this->actor = $object['attributedTo'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( isset( $object['id'] ) ) {
|
||||||
|
$this->id = $object['id'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function from_comment( $object ) {
|
public function from_comment( $object ) {
|
||||||
|
|
Loading…
Reference in a new issue