Skip to content
Snippets Groups Projects
Commit 5845b40a authored by Giovannoni Laurent's avatar Giovannoni Laurent
Browse files

fix : pb with notices

parent 12b74df7
No related branches found
No related tags found
No related merge requests found
......@@ -1212,8 +1212,8 @@ class docservers_controler
$history = new history();
$coreTools = new core_tools();
$whereClause = '';
if ($_SESSION['origin'] <> 'basket'
&& $_SESSION['origin'] <> 'workflow'
if (isset($_SESSION['origin']) && ($_SESSION['origin'] <> 'basket'
&& $_SESSION['origin'] <> 'workflow')
) {
if (isset(
$_SESSION['user']['security']
......@@ -1405,6 +1405,7 @@ class docservers_controler
$ent = new entity();
$ent->increaseListinstanceViewed($gedId);
}
$encodedContent = '';
if (file_exists($file) && !$error) {
if ($calledByWS) {
$content = '';
......@@ -1438,7 +1439,9 @@ class docservers_controler
'called_by_ws' => $calledByWS,
'error' => '',
);
if (file_exists($extract['tmpArchive'])) {
if (isset($extract)
&& file_exists($extract['tmpArchive'])
) {
Ds_washTmp($extract['tmpArchive']);
}
return $result;
......
......@@ -167,7 +167,7 @@ function Ds_createPathOnDocServer($docServer)
function Ds_extractArchive($fileInfos, $fingerprintMode)
{
//var_dump($fileInfos);
if ($fileInfos['tmpDir'] == '') {
if (!isset($fileInfos['tmpDir']) || $fileInfos['tmpDir'] == '') {
$tmp = $_SESSION['config']['tmppath'];
} else {
$tmp = $fileInfos['tmpDir'];
......@@ -275,7 +275,7 @@ function Ds_extractArchive($fileInfos, $fingerprintMode)
continue;
} else {
preg_match("'CI|.tar'", $fileScan, $out);
if (count($out[0]) == 1) {
if (isset($out[0]) && count($out[0]) == 1) {
$execError = '';
$tmpArchiveBis = uniqid(rand());
if (mkdir(
......@@ -323,7 +323,7 @@ function Ds_extractArchive($fileInfos, $fingerprintMode)
}
$tmpCmd = '';
exec($commandBis, $tmpCmd, $execError);
//echo $commandBis;exit;
//echo $commandBis;exit;
if ($execError > 0) {
$result = array(
'status' => 'ko',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment