Passed
Push — master ( 69d941...0f6eba )
by Maxwell
02:19
created
func/func.php 1 patch
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -43,7 +43,9 @@  discard block
 block discarded – undo
43 43
 	$stmt->bind_param("i", $id);
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
 	return $result->fetch_assoc();
48 50
 }
49 51
 
@@ -52,7 +54,9 @@  discard block
 block discarded – undo
52 54
 	$stmt->bind_param("s", $user);
53 55
 	$stmt->execute();
54 56
 	$result = $stmt->get_result();
55
-	if($result->num_rows === 0) return 'error';
57
+	if($result->num_rows === 0) {
58
+	    return 'error';
59
+	}
56 60
 	while($row = $result->fetch_assoc()) {
57 61
 		$id = $row['id'];
58 62
 	} 
@@ -65,7 +69,9 @@  discard block
 block discarded – undo
65 69
 	$stmt->bind_param("s", $id);
66 70
 	$stmt->execute();
67 71
 	$result = $stmt->get_result();
68
-	if($result->num_rows === 0) return('error');
72
+	if($result->num_rows === 0) {
73
+	    return('error');
74
+	}
69 75
 	while($row = $result->fetch_assoc()) {
70 76
 		$name = htmlspecialchars($row['username']);
71 77
 	} 
@@ -78,7 +84,9 @@  discard block
 block discarded – undo
78 84
 	$stmt->bind_param("s", $user);
79 85
 	$stmt->execute();
80 86
 	$result = $stmt->get_result();
81
-	if($result->num_rows === 0) return('error');
87
+	if($result->num_rows === 0) {
88
+	    return('error');
89
+	}
82 90
 	while($row = $result->fetch_assoc()) {
83 91
 		$pfp = htmlspecialchars($row['pfp']);
84 92
 	} 
@@ -102,7 +110,9 @@  discard block
 block discarded – undo
102 110
 	$stmt->bind_param("i", $id);
103 111
 	$stmt->execute();
104 112
 	$result = $stmt->get_result();
105
-	if($result->num_rows === 0) echo('That user does not exist.');
113
+	if($result->num_rows === 0) {
114
+	    echo('That user does not exist.');
115
+	}
106 116
 	while($row = $result->fetch_assoc()) {
107 117
 		$userResult['username'] = $row['username'];
108 118
 		$userResult['id'] = $row['id'];
Please login to merge, or discard this patch.
view/profile.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,9 @@
 block discarded – undo
95 95
                         $stmt->bind_param("s", $username);
96 96
                         $stmt->execute();
97 97
                         $result = $stmt->get_result();
98
-                        if($result->num_rows > 0) echo('<h1>Files</h1>');
98
+                        if($result->num_rows > 0) {
99
+                            echo('<h1>Files</h1>');
100
+                        }
99 101
                         
100 102
                         while($row = $result->fetch_assoc()) { 
101 103
                             echo '<a href="/view?id=' . $row['id'] . '">' . $row['title'] . ' [' , $row['type'] . ']</a><br>';
Please login to merge, or discard this patch.