Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request fix #16

Merged
merged 2 commits into from
Oct 17, 2013
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix bug in request processing where formdata has nested array. ref #11
  • Loading branch information
fundead committed Oct 16, 2013
commit 84b6d4babe8917fed4c9ebf44efae7a9fc23dbdc
15 changes: 8 additions & 7 deletions src/Raygun4php/RaygunRequestMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ public function __construct()
}

$this->headers = $this->emu_getAllHeaders();
$this->data = $_SERVER;
$this->form = array_map(
function($str) {
return iconv('UTF-8', 'UTF-8//IGNORE', $str);
},
$_POST
);
$this->data = $_SERVER;

$utf8_convert = function($value) use (&$utf8_convert) {
return is_array($value) ?
array_map($utf8_convert, $value) :
iconv('UTF-8', 'UTF-8//IGNORE', $value);
};
$this->form = array_map($utf8_convert, $_POST);

if (php_sapi_name() !== 'cli' &&
$_SERVER['REQUEST_METHOD'] != 'GET' &&
Expand Down