The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
< in Passwords
#6
Sorry, I knew I should have pasted all the code! I also saw a flaw in the logic I gave you. I've modified my own class though so I've gone back to the original US version; it'll be untested but should hopefully work without errors:

Code:
public static function get($item, $bypassSanitize = false){
Code:
if (isset($_POST[$item])) {
Code:
/*
Code:
If the $_POST item is an array, process each item independently, and return array of sanitized items.
Code:
*/
Code:
if (is_array($_POST[$item])){
Code:
$postItems=array();
Code:
foreach ($_POST[$item] as $postItem){
Code:
if (!$bypassSanitize) $postItem = self::sanitize($postItem);
Code:
$postItems[] = $postItem;
Code:
}
Code:
return $postItems;
Code:
}else{
Code:
if (!$bypassSanitize) $postItem = self::sanitize($_POST[$item]);
Code:
return $postItem;
Code:
}
Code:
} elseif(isset($_GET[$item])){
Code:
/*
Code:
If the $_GET item is an array, process each item independently, and return array of sanitized items.
Code:
*/
Code:
if (is_array($_GET[$item])){
Code:
$getItems=array();
Code:
foreach ($_GET[$item] as $getItem){
Code:
if (!$bypassSanitize) $getItem = self::sanitize($getItem);
Code:
$getItems[] = $getItem;
Code:
}
Code:
return $getItems;
Code:
}else{
Code:
if (!$bypassSanitize) $getItem = self::sanitize($_GET[$item]);
Code:
return $getItem;
Code:
}
Code:
}
Code:
return '';
Code:
}
  Reply


Messages In This Thread
< in Passwords - by Brandin - 07-03-2017, 06:33 PM
< in Passwords - by karsen - 07-09-2017, 07:28 PM
< in Passwords - by Brandin - 07-12-2017, 11:30 AM
< in Passwords - by mudmin - 07-12-2017, 12:26 PM
< in Passwords - by Brandin - 07-13-2017, 10:05 PM
< in Passwords - by karsen - 07-15-2017, 04:27 PM
< in Passwords - by Brandin - 07-16-2017, 06:10 PM
< in Passwords - by karsen - 07-16-2017, 08:34 PM
< in Passwords - by Brandin - 07-18-2017, 12:15 PM
< in Passwords - by Brandin - 07-18-2017, 12:18 PM
< in Passwords - by karsen - 07-18-2017, 05:13 PM
< in Passwords - by Brandin - 07-18-2017, 06:23 PM
< in Passwords - by karsen - 07-18-2017, 06:40 PM
< in Passwords - by Brandin - 07-18-2017, 06:43 PM

Forum Jump:


Users browsing this thread: 4 Guest(s)