mirror of
https://github.com/YGGverse/hl-php.git
synced 2025-03-13 05:41:13 +00:00
add strict datatype validation
This commit is contained in:
parent
a97a2de151
commit
33a77a858b
@ -49,7 +49,7 @@ class Master
|
|||||||
): ?array
|
): ?array
|
||||||
{
|
{
|
||||||
// Is connected
|
// Is connected
|
||||||
if (!is_resource($this->_socket))
|
if (false === is_resource($this->_socket))
|
||||||
{
|
{
|
||||||
$this->_errors[] = _('Socket connection error');
|
$this->_errors[] = _('Socket connection error');
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ class Master
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Filter query
|
// Filter query
|
||||||
if (!fwrite($this->_socket, "1{$region}{$host}:{$port}\0\gamedir\t{$gamedir}\0"))
|
if (false === fwrite($this->_socket, "1{$region}{$host}:{$port}\0\gamedir\t{$gamedir}\0"))
|
||||||
{
|
{
|
||||||
fclose(
|
fclose(
|
||||||
$this->_socket
|
$this->_socket
|
||||||
@ -69,7 +69,7 @@ class Master
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Skip header
|
// Skip header
|
||||||
if (!fread($this->_socket, 6))
|
if (false === fread($this->_socket, 6))
|
||||||
{
|
{
|
||||||
fclose(
|
fclose(
|
||||||
$this->_socket
|
$this->_socket
|
||||||
|
Loading…
x
Reference in New Issue
Block a user