Browse Source

php notice fixings

addons:
- bufferapp (missing errorcode)
- twitter (wrong field name 'nickname')
core:
- bbcode (incomplete attachementdata)
- crypto (uninitialized key)
pull/7575/head
Philipp Holzer 2 years ago
parent
commit
df7ec0cdf7
No known key found for this signature in database GPG Key ID: D8365C3D36B77D90
2 changed files with 16 additions and 5 deletions
  1. +10
    -1
      src/Content/Text/BBCode.php
  2. +6
    -4
      src/Util/Crypto.php

+ 10
- 1
src/Content/Text/BBCode.php View File

@ -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);


+ 6
- 4
src/Util/Crypto.php View File

@ -4,12 +4,12 @@
*/
namespace Friendica\Util;
use ASN_BASE;
use ASNValue;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\System;
use ASN_BASE;
use ASNValue;
/**
* @brief Crypto class
@ -209,8 +209,10 @@ class Crypto
$r = ASN_BASE::parseASNString($x);
$m = Strings::base64UrlDecode($r[0]->asnData[1]->asnData[0]->asnData[0]->asnData);
$e = Strings::base64UrlDecode($r[0]->asnData[1]->asnData[0]->asnData[1]->asnData);
if (isset($r[0])) {
$m = Strings::base64UrlDecode($r[0]->asnData[1]->asnData[0]->asnData[0]->asnData);
$e = Strings::base64UrlDecode($r[0]->asnData[1]->asnData[0]->asnData[1]->asnData);
}
}
/**


Loading…
Cancel
Save