Exemple #1
0
<?php

if (!get_magic_quotes_gpc()) {
    $this->skip();
}
$aTest = array("test\\'d", 'normal', "loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong\\'", "\\'short", "\\'", "''\\'''''''\\'''''''''''\\''''''\\''''''''''''\\'''", "'\\'\\'\\'\\'", array("also recursive! \\'", "or is it\\?", "\\\\\\\\\\\\\\\\\\\\\\\\"));
$aWanted = array("test'd", 'normal', "loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong'", "'short", "'", "'''''''''''''''''''''''''''''''''''''''''", "'''''", array("also recursive! '", "or is it?", "\\\\\\\\\\\\"));
mqs($aTest);
$this->isIdentical($aWanted, $aTest, _WT('mqs is not stripping slashes properly.'));
Exemple #2
0
 function mqs(&$a)
 {
     foreach ($a as &$m) {
         if (is_array($m)) {
             mqs($m);
         } else {
             $m = stripslashes($m);
         }
     }
 }