Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Changelog excerpt:
- Fixed a bottleneck in the scan process caused by the readFileBlocks
  method.
  • Loading branch information
Maikuolan committed Mar 24, 2022
1 parent 66f39de commit cff833b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ __*Why "v3.0.0" instead of "v1.0.0?"*__ Prior to phpMussel v3, the "phpMussel Co
### v3.1.1

[2021.01.10; Maikuolan]: Separated the code for performing outbound requests through cURL out to its own independent class.

### v3.1.2

[2022.03.24; Bug-fix; Maikuolan]: Fixed a bottleneck in the scan process caused by the readFileBlocks method (phpMussel/phpMussel#231).
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
},
"require": {
"php": ">=7.2.0",
"maikuolan/common": "^2.5",
"phpmussel/core": "^3.2",
"phpmussel/core": "^3.3.2",
"ext-pcre": "*"
},
"autoload": {
Expand Down
8 changes: 4 additions & 4 deletions src/CLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* License: GNU/GPLv2
* @see LICENSE.txt
*
* This file: CLI handler (last modified: 2021.07.10).
* This file: CLI handler (last modified: 2022.03.24).
*/

namespace phpMussel\CLI;
Expand Down Expand Up @@ -296,7 +296,7 @@ public function recursiveCommand(string $Command, callable $Callable): string
private function peMeta(string $File): string
{
return $this->recursiveCommand($File, function ($Params) {
$Data = $this->Loader->readFileBlocks($Params, 0, true);
$Data = $this->Loader->readFileContent($Params);
$Returnable = '';
if (substr($Data, 0, 2) !== 'MZ') {
return $this->Loader->L10N->getString('cli_pe1') . "\n";
Expand Down Expand Up @@ -393,7 +393,7 @@ private function coexFile(string $Clean): string
if (filter_var($Params, FILTER_VALIDATE_URL)) {
$Data = $this->Loader->Request->request($Params);
} elseif (is_file($Params) && is_readable($Params)) {
$Data = $this->Loader->readFileBlocks($Params, 0, true);
$Data = $this->Loader->readFileContent($Params);
}
if (empty($Data)) {
return $this->Loader->L10N->getString('invalid_data') . "\n";
Expand All @@ -420,7 +420,7 @@ private function hashFile(string $Clean): string
if (filter_var($Params, FILTER_VALIDATE_URL)) {
$Data = $this->Loader->Request->request($Params);
} elseif (is_file($Params) && is_readable($Params)) {
$Data = $this->Loader->readFileBlocks($Params, 0, true);
$Data = $this->Loader->readFileContent($Params);
}
if (empty($Data)) {
return $this->Loader->L10N->getString('invalid_data') . "\n";
Expand Down

0 comments on commit cff833b

Please sign in to comment.