Changes:
- dumped default value for $input - added unknown 'platform' which prevents an "Undefined index: platform in /var/www/.../src/Model/GServer.php on line 940" error
This commit is contained in:
parent
e5cc7a5ab1
commit
e96a548286
2 changed files with 8 additions and 5 deletions
|
@ -918,8 +918,11 @@ class GServer
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$server = ['detection-method' => self::DETECT_NODEINFO_2,
|
$server = [
|
||||||
'register_policy' => Register::CLOSED];
|
'detection-method' => self::DETECT_NODEINFO_2,
|
||||||
|
'register_policy' => Register::CLOSED,
|
||||||
|
'platform' => 'unknown',
|
||||||
|
];
|
||||||
|
|
||||||
if (!empty($nodeinfo['openRegistrations'])) {
|
if (!empty($nodeinfo['openRegistrations'])) {
|
||||||
$server['register_policy'] = Register::OPEN;
|
$server['register_policy'] = Register::OPEN;
|
||||||
|
|
|
@ -119,12 +119,12 @@ class StringsTest extends TestCase
|
||||||
/**
|
/**
|
||||||
* Tests if the string is a valid hexadecimal value
|
* Tests if the string is a valid hexadecimal value
|
||||||
*
|
*
|
||||||
* @param string $input
|
* @param string $input Input string
|
||||||
* @param bool $valid
|
* @param bool $valid Whether testing on valid or invalid
|
||||||
*
|
*
|
||||||
* @dataProvider dataIsHex
|
* @dataProvider dataIsHex
|
||||||
*/
|
*/
|
||||||
public function testIsHex(string $input = '', bool $valid = false)
|
public function testIsHex(string $input, bool $valid = false)
|
||||||
{
|
{
|
||||||
self::assertEquals($valid, Strings::isHex($input));
|
self::assertEquals($valid, Strings::isHex($input));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue