Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fixed warnings and notices issued by PHP 8.1.4#2

Merged
rijnb merged 2 commits into
mapcode-foundation:mastermapcode-foundation/mapcode-php:masterfrom
BertHooyman:php8_touch-upsBertHooyman/mapcode-php:php8_touch-upsCopy head branch name to clipboard
Sep 28, 2022
Merged

Fixed warnings and notices issued by PHP 8.1.4#2
rijnb merged 2 commits into
mapcode-foundation:mastermapcode-foundation/mapcode-php:masterfrom
BertHooyman:php8_touch-upsBertHooyman/mapcode-php:php8_touch-upsCopy head branch name to clipboard

Conversation

@BertHooyman

Copy link
Copy Markdown

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

BertHooyman commented Sep 28, 2022 via email

Copy link
Copy Markdown
Author

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.