Fix potential bugs without expected behavior change

- Fix uninitialized variables
- Fix potentially not set variables
- Fix wrong parameter default value
- Fix method scope
- Fix missing return value
This commit is contained in:
Hypolite Petovan 2019-01-07 12:51:48 -05:00
parent 45ada943b4
commit 7f2dc40601
35 changed files with 87 additions and 67 deletions

View file

@ -1963,6 +1963,7 @@ class DFRN
DBA::escape($suggest["photo"]),
DBA::escape($suggest["request"])
);
$fid = $r[0]["id"];
}
$condition = ['url' => $suggest["url"], 'name' => $suggest["name"], 'request' => $suggest["request"]];
@ -1977,8 +1978,6 @@ class DFRN
exit();
}
$fid = $r[0]["id"];
$hash = Strings::getRandomHex();
q(
@ -2219,6 +2218,7 @@ class DFRN
if (($xo->type == ACTIVITY_OBJ_PERSON) && ($xo->id)) {
// somebody was poked/prodded. Was it me?
$Blink = '';
foreach ($xo->link as $l) {
$atts = $l->attributes();
switch ($atts["rel"]) {