Skip to content

Commit fb9379d

Browse files
Merge pull request #11237 from nextcloud/backport/11042/stable14
[stable14] Remove filter_var flags due to PHP 7.3 deprecation, fixes #10894
2 parents 5bf3774 + 5058333 commit fb9379d

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

apps/oauth2/lib/Controller/SettingsController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function __construct(string $appName,
7474
public function addClient(string $name,
7575
string $redirectUri): JSONResponse {
7676

77-
if (filter_var($redirectUri, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED|FILTER_FLAG_HOST_REQUIRED) === false) {
77+
if (filter_var($redirectUri, FILTER_VALIDATE_URL) === false) {
7878
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);
7979
}
8080

apps/theming/lib/ThemingDefaults.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,7 @@ public function getShortFooter() {
174174
$legalLinks = ''; $divider = '';
175175
foreach($links as $link) {
176176
if($link['url'] !== ''
177-
&& filter_var($link['url'], FILTER_VALIDATE_URL, [
178-
'flags' => FILTER_FLAG_SCHEME_REQUIRED | FILTER_FLAG_HOST_REQUIRED
179-
])
177+
&& filter_var($link['url'], FILTER_VALIDATE_URL)
180178
) {
181179
$legalLinks .= $divider . '<a href="' . $link['url'] . '" class="legal" target="_blank"' .
182180
' rel="noreferrer noopener">' . $link['text'] . '</a>';
@@ -339,7 +337,7 @@ public function replaceImagePath($app, $image) {
339337
}
340338
return false;
341339
}
342-
340+
343341
/**
344342
* Increases the cache buster key
345343
*/

0 commit comments

Comments
 (0)