Passed
Push — master ( 8c060d...7ff734 )
by Maxwell
01:56
created
func/func.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,7 +43,9 @@  discard block
 block discarded – undo
43 43
 	$stmt->bind_param("s", $user);
44 44
 	$stmt->execute();
45 45
 	$result = $stmt->get_result();
46
-	if($result->num_rows === 0) return 'error';
46
+	if($result->num_rows === 0) {
47
+	    return 'error';
48
+	}
47 49
 	while($row = $result->fetch_assoc()) {
48 50
 		$id = $row['id'];
49 51
 	} 
@@ -56,7 +58,9 @@  discard block
 block discarded – undo
56 58
 	$stmt->bind_param("s", $id);
57 59
 	$stmt->execute();
58 60
 	$result = $stmt->get_result();
59
-	if($result->num_rows === 0) return('error');
61
+	if($result->num_rows === 0) {
62
+	    return('error');
63
+	}
60 64
 	while($row = $result->fetch_assoc()) {
61 65
 		$name = htmlspecialchars($row['username']);
62 66
 	} 
@@ -69,7 +73,9 @@  discard block
 block discarded – undo
69 73
 	$stmt->bind_param("s", $user);
70 74
 	$stmt->execute();
71 75
 	$result = $stmt->get_result();
72
-	if($result->num_rows === 0) return('error');
76
+	if($result->num_rows === 0) {
77
+	    return('error');
78
+	}
73 79
 	while($row = $result->fetch_assoc()) {
74 80
 		$pfp = htmlspecialchars($row['pfp']);
75 81
 	} 
@@ -93,7 +99,9 @@  discard block
 block discarded – undo
93 99
 	$stmt->bind_param("i", $id);
94 100
 	$stmt->execute();
95 101
 	$result = $stmt->get_result();
96
-	if($result->num_rows === 0) echo('That user does not exist.');
102
+	if($result->num_rows === 0) {
103
+	    echo('That user does not exist.');
104
+	}
97 105
 	while($row = $result->fetch_assoc()) {
98 106
 		$userResult['username'] = $row['username'];
99 107
 		$userResult['id'] = $row['id'];
Please login to merge, or discard this patch.