Fix code smells
This commit is contained in:
8 files changed
+18
-21
No files matched your search
+2
-2
@@ -216,7 +216,7 @@ public static function sanitize_url(mixed $input):string {
|
||||
}
|
||||
$rewritten .= $parsed['host'];
|
||||
if (!empty($parsed['port'])) $rewritten .= ':' . $parsed['port'];
|
||||
$rewritten .= str_replace('%2F' , '/', urlencode($parsed['path']));
|
||||
$rewritten .= str_replace('%2F', '/', urlencode($parsed['path']));
|
||||
if (!empty($parsed['query'])) {
|
||||
$rewritten .= '?' . str_replace('%3D', '=', urlencode($parsed['query']));
|
||||
}
|
||||
@@ -267,7 +267,7 @@ public static function sanitize_email(mixed $input):string {
|
||||
}
|
||||
|
||||
if (($output = \filter_var($input, FILTER_VALIDATE_EMAIL)) === false) {
|
||||
throw new MDInvalidEmail("Invalid input email address" . ' '. $input);
|
||||
throw new MDInvalidEmail("Invalid input email address" . ' ' . $input);
|
||||
}
|
||||
|
||||
return $output;
|
||||
|
||||
Reference in new issue
Block a user