Skip to content

Commit cff833b

Browse files
committed
Changelog excerpt: - Fixed a bottleneck in the scan process caused by the readFileBlocks method.
1 parent 66f39de commit cff833b

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

Changelog.md

+4
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ __*Why "v3.0.0" instead of "v1.0.0?"*__ Prior to phpMussel v3, the "phpMussel Co
1111
### v3.1.1
1212

1313
[2021.01.10; Maikuolan]: Separated the code for performing outbound requests through cURL out to its own independent class.
14+
15+
### v3.1.2
16+
17+
[2022.03.24; Bug-fix; Maikuolan]: Fixed a bottleneck in the scan process caused by the readFileBlocks method (phpMussel/phpMussel#231).

composer.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
},
1313
"require": {
1414
"php": ">=7.2.0",
15-
"maikuolan/common": "^2.5",
16-
"phpmussel/core": "^3.2",
15+
"phpmussel/core": "^3.3.2",
1716
"ext-pcre": "*"
1817
},
1918
"autoload": {

src/CLI.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* License: GNU/GPLv2
99
* @see LICENSE.txt
1010
*
11-
* This file: CLI handler (last modified: 2021.07.10).
11+
* This file: CLI handler (last modified: 2022.03.24).
1212
*/
1313

1414
namespace phpMussel\CLI;
@@ -296,7 +296,7 @@ public function recursiveCommand(string $Command, callable $Callable): string
296296
private function peMeta(string $File): string
297297
{
298298
return $this->recursiveCommand($File, function ($Params) {
299-
$Data = $this->Loader->readFileBlocks($Params, 0, true);
299+
$Data = $this->Loader->readFileContent($Params);
300300
$Returnable = '';
301301
if (substr($Data, 0, 2) !== 'MZ') {
302302
return $this->Loader->L10N->getString('cli_pe1') . "\n";
@@ -393,7 +393,7 @@ private function coexFile(string $Clean): string
393393
if (filter_var($Params, FILTER_VALIDATE_URL)) {
394394
$Data = $this->Loader->Request->request($Params);
395395
} elseif (is_file($Params) && is_readable($Params)) {
396-
$Data = $this->Loader->readFileBlocks($Params, 0, true);
396+
$Data = $this->Loader->readFileContent($Params);
397397
}
398398
if (empty($Data)) {
399399
return $this->Loader->L10N->getString('invalid_data') . "\n";
@@ -420,7 +420,7 @@ private function hashFile(string $Clean): string
420420
if (filter_var($Params, FILTER_VALIDATE_URL)) {
421421
$Data = $this->Loader->Request->request($Params);
422422
} elseif (is_file($Params) && is_readable($Params)) {
423-
$Data = $this->Loader->readFileBlocks($Params, 0, true);
423+
$Data = $this->Loader->readFileContent($Params);
424424
}
425425
if (empty($Data)) {
426426
return $this->Loader->L10N->getString('invalid_data') . "\n";

0 commit comments

Comments
 (0)