php notice fixings
addons: - bufferapp (missing errorcode) - twitter (wrong field name 'nickname') core: - bbcode (incomplete attachementdata) - crypto (uninitialized key)
This commit is contained in:
@@ -120,7 +120,16 @@ class BBCode extends BaseObject
|
||||
*/
|
||||
public static function getAttachmentData($body)
|
||||
{
|
||||
$data = [];
|
||||
// Initialize empty data array
|
||||
$data = [
|
||||
'type' => '',
|
||||
'text' => '',
|
||||
'after' => '',
|
||||
'image' => null,
|
||||
'url' => '',
|
||||
'title' => '',
|
||||
'description' => '',
|
||||
];
|
||||
|
||||
if (!preg_match("/(.*)\[attachment(.*?)\](.*?)\[\/attachment\](.*)/ism", $body, $match)) {
|
||||
return self::getOldAttachmentData($body);
|
||||
|
||||
Reference in New Issue
Block a user