1
1
Fork 0

Merge pull request #7575 from nupplaphil/bug/friendica-7299

PHP Notice fixings
This commit is contained in:
Hypolite Petovan 2019-08-28 09:41:51 -04:00 committed by GitHub
commit cc1160a243
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 5 deletions

View file

@ -120,7 +120,15 @@ class BBCode extends BaseObject
*/
public static function getAttachmentData($body)
{
$data = [];
$data = [
'type' => '',
'text' => '',
'after' => '',
'image' => null,
'url' => '',
'title' => '',
'description' => '',
];
if (!preg_match("/(.*)\[attachment(.*?)\](.*?)\[\/attachment\](.*)/ism", $body, $match)) {
return self::getOldAttachmentData($body);

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,9 +209,11 @@ class Crypto
$r = ASN_BASE::parseASNString($x);
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);
}
}
/**
* @param string $m modulo