Example #1
0
 public static function Setup()
 {
     if (!self::$setup) {
         self::$setup = true;
         // Check if post_max_size was exceeded
         if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'POST' && empty($_POST) && $_SERVER['CONTENT_LENGTH'] > 0) {
             self::$post_max_size_exceeded = true;
         }
         if (get_magic_quotes_gpc() == 1) {
             $_GET = String::RemoveSlashes($_GET);
             $_POST = String::RemoveSlashes($_POST);
             $_COOKIE = String::RemoveSlashes($_COOKIE);
         }
         $_REQUEST = array_map(array('String', 'Trim'), array_merge($_GET, $_POST));
     }
 }