diff --git a/htdocs/lib/functions.inc.php b/htdocs/lib/functions.inc.php
index d38468180c5..c1a13d28d0e 100644
--- a/htdocs/lib/functions.inc.php
+++ b/htdocs/lib/functions.inc.php
@@ -1405,7 +1405,7 @@ function dol_loginfunction($notused,$pearstatus)
print '
';
if (file_exists(DOL_DOCUMENT_ROOT.'/logo.png'))
{
- // Cas qui ne devrait pas arriver (pour compatibilité)
+ // TODO A virer Cas qui ne devrait pas arriver (pour compatibilité)
print '';
print ' |
';
}
@@ -1430,11 +1430,11 @@ function dol_loginfunction($notused,$pearstatus)
// Show logo (search in order: small company logo, large company logo, theme logo, common logo)
$width=0;
$urllogo=DOL_URL_ROOT.'/theme/login_logo.png';
- if (is_readable($conf->societe->dir_logos.'/thumbs/'.$mysoc->logo_small))
+ if (! empty($mysoc->logo_small) && is_readable($conf->societe->dir_logos.'/thumbs/'.$mysoc->logo_small))
{
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('/thumbs/'.$mysoc->logo_small);
}
- elseif (is_readable($conf->societe->dir_logos.'/'.$mysoc->logo))
+ elseif (! empty($mysoc->logo_small) && is_readable($conf->societe->dir_logos.'/'.$mysoc->logo))
{
$urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode($mysoc->logo);
$width=96;