Skip to content

Commit

Permalink
Fixes #19 and #20
Browse files Browse the repository at this point in the history
  • Loading branch information
PhoenixPeca authored Oct 16, 2018
1 parent 1eb8624 commit a697046
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ function _stripslashes($value)
{
$domain = '.' . strtolower(str_replace('..', '.', trim($domain, '.')));

if ((!preg_match('#\Q' . $domain . '\E$#i', $_url_parts['host']) && $domain != '.' . $_url_parts['host']) || (substr_count($domain, '.') < 2 && $domain{0} == '.'))
if ((!preg_match('#\Q' . $domain . '\E$#i', $_url_parts['host']) && $domain != '.' . $_url_parts['host']) || (substr_count($domain, '.') < 2 && $domain[0] == '.'))
{
continue;
}
Expand Down Expand Up @@ -659,7 +659,7 @@ function _stripslashes($value)
$data = fread($_socket, 8192);
echo $data;
}
while (isset($data{0}));
while (isset($data[0]));

fclose($_socket);
exit(0);
Expand All @@ -670,7 +670,7 @@ function _stripslashes($value)
$data = @fread($_socket, 8192); // silenced to avoid the "normal" warning by a faulty SSL connection
$_response_body .= $data;
}
while (isset($data{0}));
while (isset($data[0]));

unset($data);
fclose($_socket);
Expand Down Expand Up @@ -893,7 +893,7 @@ function _stripslashes($value)
{
$rebuild = true;

if (trim($attrs['action']) === '' || trim($attrs['action']){0} === '#')
if (trim($attrs['action']) === '' || trim($attrs['action'])[0] === '#')
{
$attrs['action'] = $_url_parts['path'];
}
Expand Down

0 comments on commit a697046

Please sign in to comment.