Last active
December 23, 2015 12:29
-
-
Save mrvdb/6636130 to your computer and use it in GitHub Desktop.
Fix for !sn log msg: 'Undefined offset: 2 (./lib/activityobject.php:765)'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/activityobject.php b/lib/activityobject.php | |
index 741aefd..3efb36c 100644 | |
--- a/lib/activityobject.php | |
+++ b/lib/activityobject.php | |
@@ -633,7 +633,7 @@ class ActivityObject | |
if ($source->created) { | |
$object->date = $source->created; | |
} | |
$object->extra[] = array('status_net', array('source_code' => $source->code)); | |
Event::handle('EndActivityObjectFromNoticeSource', array($source, &$object)); | |
@@ -660,7 +660,7 @@ class ActivityObject | |
} | |
$object->extra[] = array('status_net', array('message_id' => $message->id)); | |
Event::handle('EndActivityObjectFromMessage', array($message, &$object)); | |
} | |
@@ -762,7 +762,7 @@ class ActivityObject | |
// @fixme there's no way here to make a tree; elements can only contain plaintext | |
// @fixme these may collide with JSON extensions | |
foreach ($this->extra as $el) { | |
- list($extraTag, $attrs, $content) = $el; | |
+ list($extraTag, $attrs, $content) = array_pad($el,3,''); | |
$xo->element($extraTag, $attrs, $content); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment