Skip to content

Commit

Permalink
[UPDATE] Fixed a PHP 7.4 deprecated function that may fail Magento 2.…
Browse files Browse the repository at this point in the history
…4 upgrade
  • Loading branch information
litespeedtech committed Aug 7, 2020
1 parent da93f5d commit ae86e34
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Block/Backend/Cache/Management.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function getCacheStatistics()
$client->setOption(CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); // need to force http1.1
$client->get($statUri);
$data = trim($client->getBody());
if ($data == '' || $data{0} !== '{') {
if ($data == '' || substr($data, 0, 1) !== '{') {
return null;
}

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"name": "litespeed/module-litemage",
"description": "LiteMage Full Page Cache for LiteSpeed Web Server",
"require": {
"php": ">=7.1.0",
"php": "^7.1",
"ext-curl": "*",
"magento/module-page-cache": "*",
"magento/framework": "*"
},
"type": "magento2-module",
"version": "2.1.6",
"version": "2.1.7",
"license": [
"OSL-3.0",
"AFL-3.0"
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Litespeed_Litemage" setup_version="2.1.6">
<module name="Litespeed_Litemage" setup_version="2.1.7">
<sequence>
<module name="Magento_PageCache"/>
</sequence>
Expand Down

0 comments on commit ae86e34

Please sign in to comment.