check params to prevent PHP warnings

This commit is contained in:
Matthias Pfefferle 2020-05-23 12:34:11 +02:00
parent 6b3f26202c
commit 827aacc450

View file

@ -47,10 +47,18 @@ class Activity {
public function from_post( $object ) {
$this->object = $object;
if ( isset( $object['published'] ) ) {
$this->published = $object['published'];
}
if ( isset( $object['attributedTo'] ) ) {
$this->actor = $object['attributedTo'];
}
if ( isset( $object['id'] ) ) {
$this->id = $object['id'];
}
}
public function from_comment( $object ) {