Skip to content

Commit

Permalink
Remove filter_var flags due to PHP 7.3 deprecation, fixes #10894
Browse files Browse the repository at this point in the history
Signed-off-by: Patrik Kernstock <info@pkern.at>
  • Loading branch information
patschi committed Sep 3, 2018
1 parent a0a3450 commit 8f9fa9e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apps/oauth2/lib/Controller/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function __construct(string $appName,
public function addClient(string $name,
string $redirectUri): JSONResponse {

if (filter_var($redirectUri, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED|FILTER_FLAG_HOST_REQUIRED) === false) {
if (filter_var($redirectUri, FILTER_VALIDATE_URL) === false) {
return new JSONResponse(['message' => $this->l->t('Your redirect URL needs to be a full URL for example: https://yourdomain.com/path')], Http::STATUS_BAD_REQUEST);
}

Expand Down
6 changes: 2 additions & 4 deletions apps/theming/lib/ThemingDefaults.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,7 @@ public function getShortFooter() {
$legalLinks = ''; $divider = '';
foreach($links as $link) {
if($link['url'] !== ''
&& filter_var($link['url'], FILTER_VALIDATE_URL, [
'flags' => FILTER_FLAG_SCHEME_REQUIRED | FILTER_FLAG_HOST_REQUIRED
])
&& filter_var($link['url'], FILTER_VALIDATE_URL)
) {
$legalLinks .= $divider . '<a href="' . $link['url'] . '" class="legal" target="_blank"' .
' rel="noreferrer noopener">' . $link['text'] . '</a>';
Expand Down Expand Up @@ -339,7 +337,7 @@ public function replaceImagePath($app, $image) {
}
return false;
}

/**
* Increases the cache buster key
*/
Expand Down

0 comments on commit 8f9fa9e

Please sign in to comment.