mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 18:09:06 +01:00
- getFData() : Renforcement de la robustesse de la fonction.
This commit is contained in:
parent
0e51b76a0b
commit
0b78fe461d
1 changed files with 7 additions and 1 deletions
|
@ -48,6 +48,12 @@ function getFData($format,$data,$meth=NULL) {
|
|||
if(is_array($data)) {
|
||||
if ($meth==NULL) {
|
||||
while (ereg($expr,$format[$i],$ch)) {
|
||||
if (is_array($data[$ch[1]])) {
|
||||
$val = $data[$ch[1]][0];
|
||||
}
|
||||
else {
|
||||
$val = $data[$ch[1]];
|
||||
}
|
||||
if($ch[3]) {
|
||||
if ($ch[5]) {
|
||||
$s=$ch[3];
|
||||
|
@ -57,7 +63,7 @@ function getFData($format,$data,$meth=NULL) {
|
|||
$s=0;
|
||||
$l=$ch[3];
|
||||
}
|
||||
$val=substr((string)$data[$ch[1]],$s,$l);
|
||||
$val=substr((string)$val,$s,$l);
|
||||
}
|
||||
else {
|
||||
$val=$data[$ch[1]];
|
||||
|
|
Loading…
Reference in a new issue