- also check REQUEST_URI array element as QUERY_STRING may not be always set
- only sanitize when string is not empty
Signed-off-by: Roland Häder <rhaeder@cho-time.de>
// Is it there?
if (!empty($_SERVER['QUERY_STRING'])) {
- // Return NULL
+ // Get string escaped
$query = crackerTrackerEscapeString(urldecode($_SERVER['QUERY_STRING']));
- } // END - if
+ } elseif (!empty($_SERVER['REQUEST_URI'])) {
+ // Get string escaped
+ $query = crackerTrackerEscapeString(urldecode($_SERVER['REQUEST_URI']));
+ }
// Sanitize it?
- if ($sanitize === TRUE) {
+ if ((!empty($query)) && ($sanitize === TRUE)) {
// Sanitize ...
$query = crackerTrackerSanitize($query);
} // END - if