Skip to content
This repository has been archived by the owner on Sep 21, 2019. It is now read-only.

Commit

Permalink
Fixed indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Kane committed Sep 26, 2011
1 parent 24d57c5 commit 2e32540
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions exceptional/data.php
Expand Up @@ -74,10 +74,10 @@ function __construct(Exception $exception) {

$params = array_merge($_GET, $_POST);

foreach (Exceptional::$blacklist as $filter) {
$params = $this->filter_params($params, $filter);
}
foreach (Exceptional::$blacklist as $filter) {
$params = $this->filter_params($params, $filter);
}

if (!empty($params)) {
$data["request"]["parameters"] = $params;
}
Expand All @@ -102,18 +102,17 @@ function fill_keys(&$arr, $keys) {
}
}

function filter_params($params, $term) {
foreach ($params as $key => $value) {
if(preg_match("/$term/i", $key)) {
$params[$key] = '[FILTERED]';
}

if(is_array($value)) {
$params[$key] = $this->filter_params($value, $term);
}
}
return $params;
}
function filter_params($params, $term) {
foreach ($params as $key => $value) {
if (preg_match("/$term/i", $key)) {
$params[$key] = '[FILTERED]';
}
elseif (is_array($value)) {
$params[$key] = $this->filter_params($value, $term);
}
}
return $params;
}

}

Expand Down

0 comments on commit 2e32540

Please sign in to comment.