sforkowany z mirror/friendica
php notice fixings
addons: - bufferapp (missing errorcode) - twitter (wrong field name 'nickname') core: - bbcode (incomplete attachementdata) - crypto (uninitialized key)2022.09-rc
rodzic
b70181f9c9
commit
df7ec0cdf7
|
@ -120,7 +120,16 @@ class BBCode extends BaseObject
|
||||||
*/
|
*/
|
||||||
public static function getAttachmentData($body)
|
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)) {
|
if (!preg_match("/(.*)\[attachment(.*?)\](.*?)\[\/attachment\](.*)/ism", $body, $match)) {
|
||||||
return self::getOldAttachmentData($body);
|
return self::getOldAttachmentData($body);
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
*/
|
*/
|
||||||
namespace Friendica\Util;
|
namespace Friendica\Util;
|
||||||
|
|
||||||
|
use ASN_BASE;
|
||||||
|
use ASNValue;
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
use Friendica\Core\Hook;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\Logger;
|
use Friendica\Core\Logger;
|
||||||
use Friendica\Core\System;
|
use Friendica\Core\System;
|
||||||
use ASN_BASE;
|
|
||||||
use ASNValue;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Crypto class
|
* @brief Crypto class
|
||||||
|
@ -209,9 +209,11 @@ class Crypto
|
||||||
|
|
||||||
$r = ASN_BASE::parseASNString($x);
|
$r = ASN_BASE::parseASNString($x);
|
||||||
|
|
||||||
|
if (isset($r[0])) {
|
||||||
$m = Strings::base64UrlDecode($r[0]->asnData[1]->asnData[0]->asnData[0]->asnData);
|
$m = Strings::base64UrlDecode($r[0]->asnData[1]->asnData[0]->asnData[0]->asnData);
|
||||||
$e = Strings::base64UrlDecode($r[0]->asnData[1]->asnData[0]->asnData[1]->asnData);
|
$e = Strings::base64UrlDecode($r[0]->asnData[1]->asnData[0]->asnData[1]->asnData);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $m modulo
|
* @param string $m modulo
|
||||||
|
|
Ładowanie…
Reference in New Issue