Merge pull request #11042 from nextcloud/bugfix/10894/php73-filter_var-deprecation
Remove filter_var flags due to PHP 7.3 deprecation, fixes #10894
This commit is contained in:
commit
480783a630
2 changed files with 3 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue