Several more warnings ... (#5340)
* Some more warnings removed * Even more warnings ... * Will it ever end? ;-) * Avoid warning in dbstructure * Origin and OStatus ... * There are more warnings solved ... yeah! * And again ... * We are not done yet * And more ... * And some new places ... * And more in the feeds * Avoid some more * And some backend stuff * Notifications cleared * Some more stuff * and again ... * It's getting fewer ... * Some warnings had been hidden in the notifications * Fix the fix * And another missing one ... * We need the owner here, not the user * Forgotten user * And more ... * And some more warnings disappeared ... * Some more frontend warnings * Some backend warnings removed * Fixed sidebar for "vier" * And more ... * Some more ... * And something for "remote self" * Am I stuck in an endless loop? * Fix: Clear tag and file field on update * Preset page content
This commit is contained in:
parent
32ef5623ab
commit
0360f7197a
48 changed files with 415 additions and 267 deletions
|
|
@ -108,7 +108,7 @@ class OEmbed
|
|||
$txt = '{"type":"error"}';
|
||||
} else { //save in cache
|
||||
$j = json_decode($txt);
|
||||
if ($j->type != "error") {
|
||||
if (!empty($j->type) && $j->type != "error") {
|
||||
dba::insert('oembed', [
|
||||
'url' => normalise_link($embedurl),
|
||||
'maxwidth' => $a->videowidth,
|
||||
|
|
|
|||
|
|
@ -540,7 +540,7 @@ class BBCode extends BaseObject
|
|||
private static function convertAttachment($return, $simplehtml = false, $tryoembed = true)
|
||||
{
|
||||
$data = self::getAttachmentData($return);
|
||||
if (!$data) {
|
||||
if (empty($data) || empty($data["url"])) {
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
|
@ -549,7 +549,7 @@ class BBCode extends BaseObject
|
|||
$data["title"] = str_replace(["http://", "https://"], "", $data["title"]);
|
||||
}
|
||||
|
||||
if (((strpos($data["text"], "[img=") !== false) || (strpos($data["text"], "[img]") !== false) || Config::get('system', 'always_show_preview')) && ($data["image"] != "")) {
|
||||
if (((strpos($data["text"], "[img=") !== false) || (strpos($data["text"], "[img]") !== false) || Config::get('system', 'always_show_preview')) && !empty($data["image"])) {
|
||||
$data["preview"] = $data["image"];
|
||||
$data["image"] = "";
|
||||
}
|
||||
|
|
@ -567,6 +567,8 @@ class BBCode extends BaseObject
|
|||
throw new Exception('OEmbed is disabled for this attachment.');
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$data["title"] = defaults($data, 'title', $data['url']);
|
||||
|
||||
if ($simplehtml != 4) {
|
||||
$return = sprintf('<div class="type-%s">', $data["type"]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ class Widget
|
|||
|
||||
$cid = $zcid = 0;
|
||||
|
||||
if (is_array($_SESSION['remote'])) {
|
||||
if (!empty($_SESSION['remote'])) {
|
||||
foreach ($_SESSION['remote'] as $visitor) {
|
||||
if ($visitor['uid'] == $profile_uid) {
|
||||
$cid = $visitor['cid'];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue