strpos does not work with arrays :(

This commit is contained in:
Mario Vavti 2018-05-30 23:15:43 +02:00
parent 5505f5fa02
commit 6bfc5aa96c
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ class Channel extends \Zotlabs\Web\Controller {
function init() {
if(strpos($_GET['search'], ['@', '!', '?']) == 0)
if(strpos($_GET['search'], '@') === 0 || strpos($_GET['search'], '!') === 0 || strpos($_GET['search'], '?') === 0)
goaway('search' . '?f=&search=' . $_GET['search']);
$which = null;

View File

@ -16,7 +16,7 @@ class Network extends \Zotlabs\Web\Controller {
return;
}
if(strpos($_GET['search'], ['@', '!', '?']) == 0)
if(strpos($_GET['search'], '@') === 0 || strpos($_GET['search'], '!') === 0 || strpos($_GET['search'], '?') === 0)
goaway('search' . '?f=&search=' . $_GET['search']);
if(count($_GET) < 2) {