Merge pull request #19706 from atm-john/fix_scrutinizer_comments
Fix : scrutinizer comments
This commit is contained in:
commit
706581a227
@ -61,6 +61,11 @@ class Validate
|
||||
$this->outputLang = $outputLang;
|
||||
}
|
||||
|
||||
if (!is_object($this->outputLang) || !method_exists($outputLang, 'load')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/** @var Translate $outputLang */
|
||||
$outputLang->load('validate');
|
||||
|
||||
$this->db = $db;
|
||||
@ -212,7 +217,7 @@ class Validate
|
||||
/**
|
||||
* Check Duration validity
|
||||
*
|
||||
* @param string $duration to validate
|
||||
* @param mixed $duration to validate
|
||||
* @return boolean Validity is ok or not
|
||||
*/
|
||||
public function isDuration($duration)
|
||||
|
||||
@ -388,7 +388,7 @@ function dolRotateImage($file_path)
|
||||
* Add exif orientation correction for image
|
||||
*
|
||||
* @param string $fileSource Full path to source image to rotate
|
||||
* @param string $fileDest string : Full path to image to rotate | false return gd img | null the raw image stream will be outputted directly
|
||||
* @param string|bool $fileDest string : Full path to image to rotate | false return gd img | null the raw image stream will be outputted directly
|
||||
* @param int $quality output image quality
|
||||
* @return bool : true on success or false on failure or gd img if $fileDest is false.
|
||||
*/
|
||||
@ -630,7 +630,7 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName = '_small',
|
||||
}
|
||||
|
||||
// replace image with good orientation
|
||||
if (!empty($rotated)) {
|
||||
if (!empty($rotated) && isset($trueImgWidth) && isset($trueImgHeight)) {
|
||||
$img = $rotated;
|
||||
$imgWidth = $trueImgWidth;
|
||||
$imgHeight = $trueImgHeight;
|
||||
|
||||
@ -348,8 +348,10 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
*/
|
||||
public $hidden = false;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @var string url to check for module update
|
||||
*/
|
||||
public $url_last_version;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -747,7 +747,7 @@ class Project extends CommonObject
|
||||
'fk_projet' => $projectkey,
|
||||
'ids' => $ids,
|
||||
);
|
||||
$reshook = $hookmanager->executeHooks('getElementList', $parameters, $object, $action);
|
||||
$reshook = $hookmanager->executeHooks('getElementList', $parameters);
|
||||
if ($reshook > 0) {
|
||||
$sql = $hookmanager->resPrint;
|
||||
} else {
|
||||
|
||||
@ -101,7 +101,7 @@ if (!empty($conf->global->MAIN_MANIFEST_APPLI_LOGO_URL)) {
|
||||
$iconPath = $conf->mycompany->dir_output.'/'.$iconRelativePath;
|
||||
if (is_readable($iconPath)) {
|
||||
$imgSize = getimagesize($iconPath);
|
||||
if ($imgSize) {
|
||||
if (!empty($imgSize)) {
|
||||
$icon = new stdClass();
|
||||
$icon->src = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode($iconRelativePath);
|
||||
$icon->sizes = $imgSize[0]."x".$imgSize[1];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user