Skip to content

Commit 34ea529

Browse files
committed
Refactoring.
1 parent 752544e commit 34ea529

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

Changelog.md

+2
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,5 @@ __*Why "v3.0.0" instead of "v1.0.0?"*__ Prior to phpMussel v3, the "phpMussel Co
4747
[2021.04.19; Bug-fix; Maikuolan]: BuildPath could potentially trigger warnings when open_basedir is defined, causing logging, among various other internal file operations, to fail (related to PHP bug 69240); Fixed.
4848

4949
[2021.05.01; Bug-fix; Maikuolan]: Log truncation not being calculated properly; Fixed.
50+
51+
[2021.05.28; Maikuolan]: Performed some minor refactoring.

l10n/bn.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# License: GNU/GPLv2
88
# @see LICENSE.txt
99
#
10-
# This file: Bangla language data (last modified: 2021.03.20).
10+
# This file: Bangla language data (last modified: 2021.05.09).
1111
##/
1212

1313
# Language settings.
@@ -32,7 +32,7 @@ field_date: "তারিখ"
3232
field_header_hash_reconstruction: "হাশ স্বাক্ষর পুনর্গঠন"
3333
field_header_pe_reconstruction: "PE বিভাগীয় স্বাক্ষর পুনর্গঠন"
3434
field_header_scan_results_why_flagged: "স্ক্যান ফলাফল (কেন পতাকাঙ্কিত)"
35-
field_ip_address: "IP ঠিকানা"
35+
field_ip_address: "আইপি ঠিকানা"
3636
file: "ফাইল"
3737
filesize_limit_exceeded: "ফাইলের আকার সীমা অতিক্রম করেছে"
3838
filetype_blacklisted: "ফাইলের ধরন কালো তালিকাতে রয়েছে।"

src/Loader.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* License: GNU/GPLv2
99
* @see LICENSE.txt
1010
*
11-
* This file: The loader (last modified: 2021.05.01).
11+
* This file: The loader (last modified: 2021.05.28).
1212
*/
1313

1414
namespace phpMussel\Core;
@@ -365,6 +365,7 @@ public function __construct(
365365
$this->Events->addHandler('final', function (): bool {
366366
/** Guard. */
367367
if (
368+
$this->Configuration['core']['error_log'] === '' ||
368369
!isset($this->InstanceCache['PendingErrorLogData']) ||
369370
!($File = $this->buildPath($this->Configuration['core']['error_log']))
370371
) {
@@ -395,7 +396,7 @@ public function __construct(
395396
*/
396397
$this->Events->addHandler('error', function (string $Data, array $Err): bool {
397398
/** Guard. */
398-
if (!$this->Configuration['core']['error_log']) {
399+
if ($this->Configuration['core']['error_log'] === '') {
399400
return false;
400401
}
401402

src/Scanner.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* License: GNU/GPLv2
99
* @see LICENSE.txt
1010
*
11-
* This file: The scanner (last modified: 2021.05.01).
11+
* This file: The scanner (last modified: 2021.05.28).
1212
*/
1313

1414
namespace phpMussel\Core;
@@ -74,7 +74,7 @@ public function __construct(\phpMussel\Core\Loader &$Loader)
7474
$this->Loader->Events->addHandler('writeToSerialLog', function (): bool {
7575
/** Guard. */
7676
if (
77-
!$this->Loader->Configuration['core']['scan_log_serialized'] ||
77+
$this->Loader->Configuration['core']['scan_log_serialized'] === '' ||
7878
!($File = $this->Loader->buildPath($this->Loader->Configuration['core']['scan_log_serialized']))
7979
) {
8080
return false;
@@ -123,7 +123,7 @@ public function __construct(\phpMussel\Core\Loader &$Loader)
123123
/** Guard. */
124124
if (
125125
strlen($this->Loader->ScanResultsFormatted) === 0 ||
126-
!$this->Loader->Configuration['core']['scan_log'] ||
126+
$this->Loader->Configuration['core']['scan_log'] === '' ||
127127
!($File = $this->Loader->buildPath($this->Loader->Configuration['core']['scan_log']))
128128
) {
129129
return false;

0 commit comments

Comments
 (0)