Update BaseFormRequest.php
This commit is contained in:
@@ -35,7 +35,7 @@ abstract class BaseFormRequest
|
||||
{
|
||||
$site = parse_url(get_option('siteurl'));
|
||||
|
||||
return str_replace($site['path'], null, $this->url['path']);
|
||||
return str_replace($site['path'] ?? '', null, $this->url['path'] ?? '');
|
||||
}
|
||||
|
||||
public function validate(): void
|
||||
@@ -73,4 +73,4 @@ abstract class BaseFormRequest
|
||||
{
|
||||
return sanitize_text_field($this->validated->get($key, $default));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user