projects
/
friendica.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
795761e
)
Avoid problems with an empty body
author
Michael
<heluecht@pirati.ca>
Fri, 30 Apr 2021 04:45:31 +0000
(
04:45
+0000)
committer
Michael
<heluecht@pirati.ca>
Fri, 30 Apr 2021 04:45:31 +0000
(
04:45
+0000)
src/Model/Item.php
patch
|
blob
|
history
diff --git
a/src/Model/Item.php
b/src/Model/Item.php
index 9fa657a69fafded55b92ffdc3054240727d6198d..d842f2284f3c575746159d6f96dcb090b94eb2b8 100644
(file)
--- a/
src/Model/Item.php
+++ b/
src/Model/Item.php
@@
-2640,7
+2640,7
@@
class Item
unset($hook_data);
}
- $body = $item['body'];
+ $body = $item['body']
?? ''
;
$item['body'] = preg_replace("/\s*\[attachment .*?\].*?\[\/attachment\]\s*/ism", '', $item['body']);
self::putInCache($item);
$item['body'] = $body;