Skip to content

Commit

Permalink
Php 8.1 compatibility (#62)
Browse files Browse the repository at this point in the history
* Update composer.json

* Fix trim on null in php 8.1
  • Loading branch information
zamu87 authored Jan 10, 2023
1 parent d3ae5fe commit ec36a91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function getHostname($store = null)
self::XML_PATH_HOSTNAME,
\Magento\Store\Model\ScopeInterface::SCOPE_STORE,
$store
));
) ?? "");
}

/**
Expand All @@ -88,7 +88,7 @@ public function getCdnHostname($store = null)
self::XML_PATH_CDN_HOSTNAME,
\Magento\Store\Model\ScopeInterface::SCOPE_STORE,
$store
));
) ?? "");
}

/**
Expand Down Expand Up @@ -148,7 +148,7 @@ public function getJsScriptPath($store = null)
self::XML_PATH_JS_SCRIPT_PATH,
\Magento\Store\Model\ScopeInterface::SCOPE_STORE,
$store
)), '/') ?: 'matomo.js';
) ?? ""), '/') ?: 'matomo.js';
}

/**
Expand Down Expand Up @@ -176,7 +176,7 @@ public function getPhpScriptPath($store = null)
self::XML_PATH_PHP_SCRIPT_PATH,
\Magento\Store\Model\ScopeInterface::SCOPE_STORE,
$store
)), '/') ?: 'matomo.php';
) ?? ""), '/') ?: 'matomo.php';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"AGPL-3.0+"
],
"require": {
"php": "~7.0.0|~7.1.0|~7.2.0|~7.3.0|~7.4.0",
"php": "~7.0.0|~7.1.0|~7.2.0|~7.3.0|~7.4.0|^8.1",
"magento/framework": "~101.0|~102.0|~103.0",
"magento/module-catalog": "~102.0|~103.0|~104.0",
"magento/module-catalog-search": "~100.0|~101.0|~102.0",
Expand Down

0 comments on commit ec36a91

Please sign in to comment.