Guest User

Untitled

a guest
Jun 19th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. <?php
  2. function fix_input_quotes() {
  3. if (get_magic_quotes_gpc()) {
  4. array_stripslashes($_GET);
  5. array_stripslashes($_POST);
  6. array_stripslashes($_COOKIE);
  7. }
  8. }
  9.  
  10. function array_stripslashes(&$array) {
  11. if (!is_array($array)) {
  12. return;
  13. }
  14. foreach ($array as $k => $v) {
  15. if (is_array($array[$k])) {
  16. array_stripslashes($array[$k]);
  17. } else {
  18. $array[$k] = stripslashes($array[$k]);
  19. }
  20. }
  21. return $array;
  22. }
  23. ?>
Add Comment
Please, Sign In to add comment