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,10 +47,18 @@ class Activity {
|
||||||
|
|
||||||
public function from_post( $object ) {
|
public function from_post( $object ) {
|
||||||
$this->object = $object;
|
$this->object = $object;
|
||||||
|
if ( isset( $object['published'] ) ) {
|
||||||
$this->published = $object['published'];
|
$this->published = $object['published'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( isset( $object['attributedTo'] ) ) {
|
||||||
$this->actor = $object['attributedTo'];
|
$this->actor = $object['attributedTo'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( isset( $object['id'] ) ) {
|
||||||
$this->id = $object['id'];
|
$this->id = $object['id'];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function from_comment( $object ) {
|
public function from_comment( $object ) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue