Salut
Dans la fonction suivante, à quoi peut bien servir le & devant $arr dans la ligne 1 ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
 
function mosGetParam( &$arr, $name, $def=null, $mask=0 ) {
 static $noHtmlFilter = null;
 static $safeHtmlFilter = null;
 
 $return = null;
 if (isset( $arr[$name] )) {
  if (is_string( $arr[$name] )) {
   if (!($mask&_MOS_NOTRIM)) {
    $arr[$name] = trim( $arr[$name] );
   }
   if ($mask&_MOS_ALLOWRAW) {
    // do nothing
   } else if ($mask&_MOS_ALLOWHTML) {
    // do nothing - compatibility mode
    /*
    if (is_null( $safeHtmlFilter )) {
     $safeHtmlFilter = new InputFilter( null, null, 1, 1 );
    }
    $arr[$name] = $safeHtmlFilter->process( $arr[$name] );
    */
   } else {
    if (is_null( $noHtmlFilter )) {
     $noHtmlFilter = new InputFilter( /* $tags, $attr, $tag_method, $attr_method, $xss_auto */ );
    }
    $arr[$name] = $noHtmlFilter->process( $arr[$name] );
   }
   if (!get_magic_quotes_gpc()) {
    $arr[$name] = addslashes( $arr[$name] );
   }
  }
  return $arr[$name];
 } else {
  return $def;
 }
}
Merci