diff options
author | rvelices <rv-github@modusoptimus.com> | 2010-03-01 21:23:51 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2010-03-01 21:23:51 +0000 |
commit | 26e605d4b63950c292459ee2ea043559430c2306 (patch) | |
tree | 18ef4b107be27ccb9c6065085e7b45d92d30d6c0 | |
parent | 117baff95c113935b636e1759828462de290faa1 (diff) |
use fatal_error instead of die function (fatal_error leaves a trace in php error log making easier to see potential problems on "production" galleries)
git-svn-id: http://piwigo.org/svn/branches/2.0@5017 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | include/functions.inc.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php index 5b594a512..6bd311f52 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -1516,25 +1516,25 @@ function check_input_parameter($param_name, $param_array, $is_array, $pattern) { $param_value = $param_array[$param_name]; } - + // it's ok if the input parameter is null if (empty($param_value)) { return true; } - + if ($is_array) { if (!is_array($param_value)) { - die('[Hacking attempt] the input parameter "'.$param_name.'" should be an array'); + fatal_error('[Hacking attempt] the input parameter "'.$param_name.'" should be an array'); } foreach ($param_value as $item_to_check) { if (!preg_match($pattern, $item_to_check)) { - die('[Hacking attempt] an item is not valid in input parameter "'.$param_name.'"'); + fatal_error('[Hacking attempt] an item is not valid in input parameter "'.$param_name.'"'); } } } @@ -1542,7 +1542,7 @@ function check_input_parameter($param_name, $param_array, $is_array, $pattern) { if (!preg_match($pattern, $param_value)) { - die('[Hacking attempt] the input parameter "'.$param_name.'" is not valid'); + fatal_error('[Hacking attempt] the input parameter "'.$param_name.'" is not valid'); } } } @@ -1552,7 +1552,7 @@ function check_input_parameter($param_name, $param_array, $is_array, $pattern) * if pwg_token is empty action doesn't require token * else pwg_token is compare to server token * - * @return void access denied if token given is not equal to server token + * @return void access denied if token given is not equal to server token */ function check_pwg_token() { @@ -1569,7 +1569,7 @@ function check_pwg_token() } if ($given_token != $valid_token) { - access_denied(); + access_denied(); } } |