Skip to content

Conversation

@BertHooyman
Copy link

several api functions (decodeTriple and decode) returned either an object or an int 0. This leads to warnings in the calling code under PHP 8.1. As a fix, these functions now return null rather than 0.

In various places, associative arrays were accessed using non-existing keys. E.g. $GLOBALS['redivar'], $_REQUEST['s'], $_GET['edge'] and $_GET['start']. Code has been extended to avoid such access.

In the function territory_code_tests() in unittest.php, there was a $testdata array entry for 'US-CA OTHER TEXT' having a context of '-1 -1'. This is evaluated as -2 and that leads to a warning in PHP 8.1. The context has been fixed to '-1'

Indexing into an uninitialized array leads to warning in PHP 8.1. This has been fixed for accessing $result[$p] in to_ascii()

@rijnb rijnb merged commit 8319f45 into mapcode-foundation:master Sep 28, 2022
@BertHooyman
Copy link
Author

BertHooyman commented Sep 28, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants