$attachments should aways be an array

In order to avoid a PHP 7.2 error when using count()
このコミットが含まれているのは:
Pierre Rudloff 2018-04-24 16:22:29 +02:00
コミット 9bb11ccfa5
1個のファイルの変更2行の追加2行の削除

ファイルの表示

@ -2716,7 +2716,7 @@ function api_convert_item($item)
*
* @param string $body
*
* @return array|false
* @return array
*/
function api_get_attachments(&$body)
{
@ -2727,7 +2727,7 @@ function api_get_attachments(&$body)
$ret = preg_match_all("/\[img\]([$URLSearchString]*)\[\/img\]/ism", $text, $images);
if (!$ret) {
return false;
return [];
}
$attachments = [];