Ajout debug en cas d'erreur
This commit is contained in:
parent
0467828e7c
commit
5a288b90d9
@ -110,7 +110,7 @@ if ($resql)
|
|||||||
|
|
||||||
function CreatePreselection($host, $user_login, $user_passwd, $ligne, $id_person)
|
function CreatePreselection($host, $user_login, $user_passwd, $ligne, $id_person)
|
||||||
{
|
{
|
||||||
dolibarr_syslog("Appel de CreatePreselection($host, $user_login, $user_passwd, $ligne, $id_person)");
|
dolibarr_syslog("Appel de CreatePreselection($host, $user_login, ****, $ligne, $id_person)");
|
||||||
|
|
||||||
$url = "/AzurApp_websvc_b3gdb/account.asmx/CreatePreselection?";
|
$url = "/AzurApp_websvc_b3gdb/account.asmx/CreatePreselection?";
|
||||||
|
|
||||||
@ -138,6 +138,8 @@ function CreatePreselection($host, $user_login, $user_passwd, $ligne, $id_person
|
|||||||
$parse = 0;
|
$parse = 0;
|
||||||
$result = "error";
|
$result = "error";
|
||||||
|
|
||||||
|
$fresult = "";
|
||||||
|
|
||||||
while (!feof($fp))
|
while (!feof($fp))
|
||||||
{
|
{
|
||||||
$line = fgets($fp, 1024);
|
$line = fgets($fp, 1024);
|
||||||
@ -155,6 +157,9 @@ function CreatePreselection($host, $user_login, $user_passwd, $ligne, $id_person
|
|||||||
{
|
{
|
||||||
$parse = 1;
|
$parse = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$fresult .= $line;
|
||||||
|
|
||||||
}
|
}
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
}
|
}
|
||||||
@ -167,6 +172,14 @@ function CreatePreselection($host, $user_login, $user_passwd, $ligne, $id_person
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
dolibarr_syslog("Presel échouée ligne ".$ligne." id client ".$id_person." $result\n");
|
dolibarr_syslog("Presel échouée ligne ".$ligne." id client ".$id_person." $result\n");
|
||||||
|
|
||||||
|
$fp = fopen("/tmp/$ligne.presel","w");
|
||||||
|
if ($fp)
|
||||||
|
{
|
||||||
|
fwrite($fp, $fresult);
|
||||||
|
fclose($fp);
|
||||||
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user