summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Walker <walkah@walkah.net>2010-03-13 10:51:32 -0500
committerJames Walker <walkah@walkah.net>2010-03-13 10:51:32 -0500
commit6ee536c258add47c586210cfa8815c03b4037bbe (patch)
treefb393c0c9f72e9be2be159df998273bf63169afb
parent135c0c8a7fa56a6d4008f73314bb6f18551e869a (diff)
parenta9dabbe77e8ab575aaf5c3742e2cddb4874e6881 (diff)
Merge remote branch 'statusnet/testing' into crypt-rsa-switch
-rw-r--r--lib/activity.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/activity.php b/lib/activity.php
index 125d391b0..738200c0b 100644
--- a/lib/activity.php
+++ b/lib/activity.php
@@ -457,7 +457,7 @@ class ActivityUtils
// slavishly following http://atompub.org/rfc4287.html#rfc.section.4.1.3.3
- if ($type == 'text') {
+ if (empty($type) || $type == 'text') {
return $contentEl->textContent;
} else if ($type == 'html') {
$text = $contentEl->textContent;
@@ -476,7 +476,7 @@ class ActivityUtils
$text .= $doc->saveXML($child);
}
return trim($text);
- } else if (in_array(array('text/xml', 'application/xml'), $type) ||
+ } else if (in_array($type, array('text/xml', 'application/xml')) ||
preg_match('#(+|/)xml$#', $type)) {
throw new ClientException(_("Can't handle embedded XML content yet."));
} else if (strncasecmp($type, 'text/', 5)) {