Notices again (#5543)

* And again notices

* Notices in the directory

* Much more places

* Fix some double $

* Notice in ping

* Missing field

* Fix: We now remove deleted users from the directory

* Some more stuff

* Notices when removing users

* Added logging

* More logging

* Two more
This commit is contained in:
Michael Vogel 2018-08-02 07:21:01 +02:00 committed by Tobias Diekershoff
parent c960a97682
commit c72c64a6d8
17 changed files with 95 additions and 57 deletions

View file

@ -86,7 +86,7 @@ class BBCode extends BaseObject
$post["url"] = $matches[1];
$post["title"] = $matches[2];
}
if (($post["url"] == "") && (in_array($post["type"], ["link", "video"]))
if (!empty($post["url"] == "") && (in_array($post["type"], ["link", "video"]))
&& preg_match("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", $attacheddata, $matches)) {
$post["url"] = $matches[1];
}
@ -609,7 +609,7 @@ class BBCode extends BaseObject
if (!$data) {
return $Text;
} elseif ($nolink) {
return $data["text"] . $data["after"];
return $data["text"] . defaults($data, 'after', '');
}
$title = htmlentities(defaults($data, 'title', ''), ENT_QUOTES, 'UTF-8', false);
@ -632,7 +632,7 @@ class BBCode extends BaseObject
$text = $data["text"];
if (!empty($data["url"]) && ($data["title"] != "")) {
if (!empty($data["url"]) && !empty($data["title"])) {
$text .= "\n[url=" . $data["url"] . "]" . $data["title"] . "[/url]";
} elseif (!empty($data["url"])) {
$text .= "\n[url]" . $data["url"] . "[/url]";