예제 #1
0
파일: mqs.php 프로젝트: extend/wee
<?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.'));
예제 #2
0
파일: wee.php 프로젝트: extend/wee
 function mqs(&$a)
 {
     foreach ($a as &$m) {
         if (is_array($m)) {
             mqs($m);
         } else {
             $m = stripslashes($m);
         }
     }
 }