Skip to content

Commit

Permalink
Another PHP 8.1 fix
Browse files Browse the repository at this point in the history
Fixes this deprecation warning:
```
PHP Deprecated:  strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in /srv/matomo/vendor/matomo/matomo-php-tracker/MatomoTracker.php on line 1623
```
  • Loading branch information
sgiehl committed Nov 15, 2021
1 parent 37ad506 commit 8626c76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MatomoTracker.php
Original file line number Diff line number Diff line change
Expand Up @@ -1620,7 +1620,7 @@ protected function sendRequest($url, $method = 'GET', $data = null, $force = fal

$forcePostUrlEncoded = false;
if (!$this->doBulkRequests) {
if (strtoupper($this->requestMethod) === 'POST') {
if (!empty($this->requestMethod) && strtoupper($this->requestMethod) === 'POST') {
// POST ALL parameters and have no GET parameters
$urlParts = explode('?', $url);

Expand Down

0 comments on commit 8626c76

Please sign in to comment.