mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-15 19:07:58 +00:00
ignore API parameters in array notation
PHP automatically parses parameters in an array notation(foo[]) into array types. Ignore these parameters as 'unknown'. Fixes #2763.
This commit is contained in:
@@ -137,9 +137,6 @@ class ParameterParserTest extends \PHPUnit\Framework\TestCase
|
||||
|
||||
public function testGetSet()
|
||||
{
|
||||
$this->expectException(\Exception::class);
|
||||
$this->expectExceptionMessage("Parameter 'val3' must be one of: foo, bar");
|
||||
|
||||
$oParams = new ParameterParser(array(
|
||||
'val1' => 'foo',
|
||||
'val2' => '',
|
||||
@@ -151,7 +148,7 @@ class ParameterParserTest extends \PHPUnit\Framework\TestCase
|
||||
$this->assertSame('foo', $oParams->getSet('val1', array('foo', 'bar')));
|
||||
|
||||
$this->assertSame(false, $oParams->getSet('val2', array('foo', 'bar')));
|
||||
$oParams->getSet('val3', array('foo', 'bar'));
|
||||
$this->assertSame(false, $oParams->getSet('val3', array('foo', 'bar')));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user