aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Activity.php
diff options
context:
space:
mode:
authornobody <nobody@zotlabs.com>2021-02-22 17:23:08 -0800
committernobody <nobody@zotlabs.com>2021-02-22 17:23:08 -0800
commitfc88c306ab282ab7061d69e5bdc60896fbdb8839 (patch)
treec879e33c09b06f75c24af7e421354df629705f14 /Zotlabs/Lib/Activity.php
parent5664f5e0a2042287e81564d85816fdce6f1614a2 (diff)
downloadvolse-hubzilla-fc88c306ab282ab7061d69e5bdc60896fbdb8839.tar.gz
volse-hubzilla-fc88c306ab282ab7061d69e5bdc60896fbdb8839.tar.bz2
volse-hubzilla-fc88c306ab282ab7061d69e5bdc60896fbdb8839.zip
some minor issues uncovered during hubzilla->zap export testing
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r--Zotlabs/Lib/Activity.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index d286f35c2..6129e7f55 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -3313,17 +3313,17 @@ class Activity {
$ret = false;
foreach ($attach as $a) {
- if (strpos($a['type'], 'image') !== false) {
+ if (array_key_exists('type',$a) && stripos($a['type'], 'image') !== false) {
if (self::media_not_in_body($a['href'], $body)) {
$ret .= "\n\n" . '[img]' . $a['href'] . '[/img]';
}
}
- if (array_key_exists('type', $a) && strpos($a['type'], 'video') === 0) {
+ if (array_key_exists('type', $a) && stripos($a['type'], 'video') !== false) {
if (self::media_not_in_body($a['href'], $body)) {
$ret .= "\n\n" . '[video]' . $a['href'] . '[/video]';
}
}
- if (array_key_exists('type', $a) && strpos($a['type'], 'audio') === 0) {
+ if (array_key_exists('type', $a) && stripos($a['type'], 'audio') !== false) {
if (self::media_not_in_body($a['href'], $body)) {
$ret .= "\n\n" . '[audio]' . $a['href'] . '[/audio]';
}