Skip to content

Commit 0070455

Browse files
committed
Method migration.
Changelog excerpt: - The atHit method has been migrated from the Loader class to the Scanner class, affecting some calls to that method at the Web class; Those calls have been updated accordingly.
1 parent 47012e2 commit 0070455

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

Changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,5 @@ __*Why "v3.0.0" instead of "v1.0.0?"*__ Prior to phpMussel v3, the "phpMussel Co
6969
### v3.4.1
7070

7171
[2023.09.01; Maikuolan]: Added L10N for Afrikaans and Romanian.
72+
73+
[2023.09.04; Maikuolan]: The atHit method has been migrated from the Loader class to the Scanner class, affecting some calls to that method at the Web class; Those calls have been updated accordingly.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"require": {
1414
"php": ">=7.2.0",
15-
"phpmussel/core": "^3.4",
15+
"phpmussel/core": "^3.4.1",
1616
"ext-pcre": "*"
1717
},
1818
"autoload": {

src/Web.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* License: GNU/GPLv2
99
* @see LICENSE.txt
1010
*
11-
* This file: Upload handler (last modified: 2023.04.04).
11+
* This file: Upload handler (last modified: 2023.09.04).
1212
*/
1313

1414
namespace phpMussel\Web;
@@ -208,7 +208,7 @@ public function scan()
208208
if ($this->Loader->Configuration['compatibility']['ignore_upload_errors'] || $ThisError > 8 || $ThisError === 5) {
209209
continue;
210210
}
211-
$this->Loader->atHit('', -1, '', sprintf(
211+
$this->Scanner->atHit('', -1, '', sprintf(
212212
$this->Loader->L10N->getString('grammar_exclamation_mark'),
213213
$this->Loader->L10N->getString('upload_error_' . (($ThisError === 3 || $ThisError === 4) ? '34' : $ThisError))
214214
), -5, -1);
@@ -228,13 +228,13 @@ public function scan()
228228
!$FilesData['name'][$Iterator] ||
229229
!$FilesData['tmp_name'][$Iterator]
230230
) {
231-
$this->Loader->atHit('', -1, '', $this->Loader->L10N->getString('scan_unauthorised_upload_or_misconfig'), -5, -1);
231+
$this->Scanner->atHit('', -1, '', $this->Loader->L10N->getString('scan_unauthorised_upload_or_misconfig'), -5, -1);
232232
continue;
233233
}
234234

235235
/** Protection against upload spoofing (2/2). */
236236
if (!is_uploaded_file($FilesData['tmp_name'][$Iterator])) {
237-
$this->Loader->atHit(
237+
$this->Scanner->atHit(
238238
'',
239239
$FilesData['size'][$Iterator],
240240
$FilesData['name'][$Iterator],
@@ -250,7 +250,7 @@ public function scan()
250250
$this->Loader->Configuration['web']['max_uploads'] >= 1 &&
251251
$this->Uploads > $this->Loader->Configuration['web']['max_uploads']
252252
) {
253-
$this->Loader->atHit('', $FilesData['size'][$Iterator], $FilesData['name'][$Iterator], sprintf(
253+
$this->Scanner->atHit('', $FilesData['size'][$Iterator], $FilesData['name'][$Iterator], sprintf(
254254
$this->Loader->L10N->getString('grammar_exclamation_mark'),
255255
sprintf(
256256
$this->Loader->L10N->getString('grammar_brackets'),

0 commit comments

Comments
 (0)