wipfix: correct contatenation of options

This commit is contained in:
rugk
2025-09-03 13:43:57 +00:00
parent 0a398d73f0
commit 879b696f22
+2 -2
View File
@@ -49,11 +49,11 @@ abstract class AbstractProxy
*/ */
public function __construct(Configuration $conf, string $link) public function __construct(Configuration $conf, string $link)
{ {
if (!filter_var($link, FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED & FILTER_FLAG_QUERY_REQUIRED)) { if (!filter_var($link, FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED | FILTER_FLAG_QUERY_REQUIRED)) {
$this->_error = 'Invalid URL given.'; $this->_error = 'Invalid URL given.';
return; return;
} }
if (!str_starts_with($link, $conf->getKey('basepath') . '?') || if (!str_starts_with($link, $conf->getKey('basepath') . '?') ||
parse_url($link, PHP_URL_HOST) != parse_url($conf->getKey('basepath'), PHP_URL_HOST) parse_url($link, PHP_URL_HOST) != parse_url($conf->getKey('basepath'), PHP_URL_HOST)
) { ) {