summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrik Kernstock <info@pkern.at>2018-09-04 00:58:44 +0200
committerPatrik Kernstock <info@pkern.at>2018-09-04 00:58:44 +0200
commit8f9fa9ee13bcbf134901d35ce94945386d5f4647 (patch)
treecac6ffdb9043d6e2cb552963f7eea434dc5cbf54
parenta0a34502c6cfa8d5e70147d055de7ee2d705633b (diff)
downloadnextcloud-server-8f9fa9ee13bcbf134901d35ce94945386d5f4647.tar.gz
nextcloud-server-8f9fa9ee13bcbf134901d35ce94945386d5f4647.zip
Remove filter_var flags due to PHP 7.3 deprecation, fixes #10894
Signed-off-by: Patrik Kernstock <info@pkern.at>
-rw-r--r--apps/oauth2/lib/Controller/SettingsController.php2
-rw-r--r--apps/theming/lib/ThemingDefaults.php6
2 files changed, 3 insertions, 5 deletions
diff --git a/apps/oauth2/lib/Controller/SettingsController.php b/apps/oauth2/lib/Controller/SettingsController.php
index 499969b93bb..ecf3179e1bc 100644
--- a/apps/oauth2/lib/Controller/SettingsController.php
+++ b/apps/oauth2/lib/Controller/SettingsController.php
@@ -74,7 +74,7 @@ class SettingsController extends Controller {
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);
}
diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php
index fe1b1d4c17f..1df7a9f17bb 100644
--- a/apps/theming/lib/ThemingDefaults.php
+++ b/apps/theming/lib/ThemingDefaults.php
@@ -174,9 +174,7 @@ class ThemingDefaults extends \OC_Defaults {
$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>';
@@ -339,7 +337,7 @@ class ThemingDefaults extends \OC_Defaults {
}
return false;
}
-
+
/**
* Increases the cache buster key
*/