Skip to content
Snippets Groups Projects
Commit 75624376 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

FIX Warnings

parent b441c62e
No related branches found
No related tags found
No related merge requests found
......@@ -72,11 +72,11 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil
$reshook = 0;
$file_list = array();
$hookmanager->resArray=array();
if (! $nohook)
if (is_object($hookmanager) && ! $nohook)
{
$hookmanager->initHooks(array('fileslib'));
$hookmanager->resArray=array();
$hookmanager->initHooks(array('fileslib'));
$parameters=array(
'path' => $newpath,
......@@ -197,7 +197,7 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil
}
}
$file_list = array_merge($file_list, $hookmanager->resArray);
if (is_object($hookmanager) && is_array($hookmanager->resArray)) $file_list = array_merge($file_list, $hookmanager->resArray);
return $file_list;
}
......
......@@ -38,7 +38,7 @@ $quality = 80;
function image_format_supported($file)
{
$regeximgext='\.gif|\.jpg|\.jpeg|\.png|\.bmp|\.xpm|\.xbm'; // See also into product.class.php
// Case filename is not a format image
if (! preg_match('/('.$regeximgext.')$/i',$file,$reg)) return -1;
......@@ -90,7 +90,7 @@ function dol_getImageSize($file, $url = false)
$ret['width']=$infoImg[0]; // Largeur de l'image
$ret['height']=$infoImg[1]; // Hauteur de l'image
}
return $ret;
}
......@@ -438,6 +438,7 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName='_small', $
dol_mkdir($dirthumb);
// Initialisation des variables selon l'extension de l'image
$img=null;
switch($infoImg[2])
{
case IMAGETYPE_GIF: // 1
......
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