Skip to content

Commit 9601eb8

Browse files
committed
Added: $_FILES to logging parameter.
Fixed: Cannot use assign-op operators with string offsets PHP error with malformed shortcodes.
1 parent 8eccd72 commit 9601eb8

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/Request.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ public function getParameterValues($parameter, $data = [])
6666
case 'log':
6767
return [
6868
'post' => $_POST,
69+
'files' => $_FILES,
6970
'raw' => $this->getParameterValues('raw')
7071
];
7172
break;
@@ -414,7 +415,7 @@ public function getShortcodeAtts($value)
414415
$atts = @\shortcode_parse_atts($shortcode[3]);
415416
foreach ($atts as $key => $value) {
416417
if (isset($return[$shortcode[2]][$key])) {
417-
$return[$shortcode[2]][$key] .= $value;
418+
$return[$shortcode[2]][$key] = $return[$shortcode[2]][$key] . $value;
418419
} else {
419420
$return[$shortcode[2]][$key] = $value;
420421
}

tests/RequestTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ public function testGetParameterValues()
336336
$parameter = 'log';
337337
$expected = [
338338
'post' => $_POST,
339+
'files' => [],
339340
'raw' => null
340341
];
341342
$result = $this->request->getParameterValues($parameter);

0 commit comments

Comments
 (0)