diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 22a86cd7b3f..02cb6e663e2 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1248,7 +1248,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu if (empty($modulepart)) return 'ErrorBadParameter'; if (empty($entity)) $entity=0; - dol_syslog('$modulepart='.$modulepart.' $original_file= '.$original_file); + dol_syslog('modulepart='.$modulepart.' original_file= '.$original_file); // We define $accessallowed and $sqlprotectagainstexternals $accessallowed=0; $sqlprotectagainstexternals=''; diff --git a/htdocs/document.php b/htdocs/document.php index 15ac9d0d9ca..c3c7e1fc523 100644 --- a/htdocs/document.php +++ b/htdocs/document.php @@ -178,4 +178,4 @@ header('Pragma: public'); readfile($original_file_osencoded); -?> +if (is_object($db)) $db->close(); diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php index 200986dd08a..4a9e7538faa 100644 --- a/htdocs/viewimage.php +++ b/htdocs/viewimage.php @@ -198,4 +198,3 @@ else // Open and return file if (is_object($db)) $db->close(); -?>