diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index 54c7b31e3f3..a923a89207e 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -1208,7 +1208,7 @@ function img_object($alt, $object, $options='') $object = $regs[1]; $path = $regs[2]; // If img file not into standard path, we use alternate path - if (DOL_URL_ROOT_ALT && ! file_exists(DOL_DOCUMENT_ROOT.'/'.$path.'/img/object_'.$object.'.png')) $url = DOL_URL_ROOT_ALT; + if (defined('DOL_URL_ROOT_ALT') && DOL_URL_ROOT_ALT && ! file_exists(DOL_DOCUMENT_ROOT.'/'.$path.'/img/object_'.$object.'.png')) $url = DOL_URL_ROOT_ALT; } return ''.dol_escape_htmltag($alt).''; @@ -1237,7 +1237,7 @@ function img_picto($alt, $picto, $options='', $pictoisfullpath=0) $picto = $regs[1]; $path = $regs[2]; // If img file not into standard path, we use alternate path - if (DOL_URL_ROOT_ALT && ! file_exists(DOL_DOCUMENT_ROOT.'/'.$path.'/img/'.$picto)) $url = DOL_URL_ROOT_ALT; + if (defined('DOL_URL_ROOT_ALT') && DOL_URL_ROOT_ALT && ! file_exists(DOL_DOCUMENT_ROOT.'/'.$path.'/img/'.$picto)) $url = DOL_URL_ROOT_ALT; } if (! preg_match('/(\.png|\.gif)$/i',$picto)) $picto.='.png';