Skip to content
Snippets Groups Projects

Issue #3418766 by jay.silverman: Deprecated function: urldecode()

Closed Issue #3418766 by jay.silverman: Deprecated function: urldecode()
Closed Lara requested to merge 3418766-urldecode into 1.0.x
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -146,7 +146,7 @@ class RegexRedirectForm extends ContentEntityForm {
* @throws MatchingRouteNotFoundException
*/
protected function setDefaultOptions(RegexRedirect $redirect) {
$source_url = urldecode($this->getRequest()->get('source'));
$source_url = urldecode($this->getRequest()->get('source') ?? '');
if (!empty($source_url)) {
$redirect->setSource($source_url);
}
@@ -215,7 +215,7 @@ class RegexRedirectForm extends ContentEntityForm {
$source_regex = $delimiter . trim($source_path) . $delimiter;
$redirect_regex = str_replace('internal:', '', $redirect_uri);
if (preg_match($source_regex, NULL) === FALSE) {
if (preg_match($source_regex, '') === FALSE) {
$form_state->setErrorByName('regex_redirect_source', $this->t('The regex redirect source must be a regex pattern.'));
}
if (preg_match('/<(.*?)>/', $redirect_regex) !== 1) {
Loading