Changeset 2798
- Timestamp:
- 11/12/08 00:52:32 (2 months ago)
- Location:
- branches/sginput/htdocs
- Files:
-
- 2 modified
-
index.php (modified) (1 diff)
-
system/classes/superglobal.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/sginput/htdocs/index.php
r2789 r2798 112 112 Error::handle_errors(); 113 113 114 // Replace all of the $_GET, $_POST, and $_COOKIEsuperglobals with object114 // Replace all of the $_GET, $_POST, $_COOKIE and $_SERVER superglobals with object 115 115 // representations of each. Unset $_REQUEST, which is evil. 116 SuperGlobal::process_gpc ();116 SuperGlobal::process_gpcs(); 117 117 118 118 /* Initiate install verifications */ -
branches/sginput/htdocs/system/classes/superglobal.php
r2795 r2798 10 10 protected $values = array(); 11 11 12 public function __construct( array$array)12 public function __construct($array) 13 13 { 14 if (!is_array($array) && !$array instanceof SuperGlobal) { 15 throw new Exception('Parameter must be array or SuperGlobal'); 16 } 14 17 $values['default'] = array(); 15 18 parent::__construct($array); … … 17 20 18 21 /** 19 * Convert $_GET, $_POST, and $_COOKIEinto SuperGlobal instances, also kill $_REQUEST22 * Convert $_GET, $_POST, $_COOKIE and $_SERVER into SuperGlobal instances, also kill $_REQUEST 20 23 * 21 24 * @return 22 25 */ 23 public static function process_gpc ()26 public static function process_gpcs() 24 27 { 25 28 /* We should only revert the magic quotes once per page hit */ … … 40 43 $_POST = new SuperGlobal($_POST); 41 44 $_COOKIE = new SuperGlobal($_COOKIE); 45 $_SERVER = new SuperGlobal($_SERVER); 42 46 unset($_REQUEST); 43 47
