diff --git a/htdocs/core/class/canvas.class.php b/htdocs/core/class/canvas.class.php index 41086045e7a..372e721acda 100644 --- a/htdocs/core/class/canvas.class.php +++ b/htdocs/core/class/canvas.class.php @@ -224,5 +224,6 @@ class Canvas $ret = $this->control->doActions($action, $id); return $ret; } + return null; } } diff --git a/htdocs/core/class/utils.class.php b/htdocs/core/class/utils.class.php index 3a1e6e34a96..42880621de5 100644 --- a/htdocs/core/class/utils.class.php +++ b/htdocs/core/class/utils.class.php @@ -52,7 +52,7 @@ class Utils public $output; /** - * @var array{'commandbackuplastdone': string, 'commandbackuptorun': string} Used by Cron method to return data + * @var array{commandbackuplastdone:string,commandbackuptorun:string} Used by Cron method to return data */ public $result; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 95ff513a50e..8d19ca4cf4f 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -9809,6 +9809,11 @@ function dol_eval($s, $returnvalue = 0, $hideerrors = 1, $onlysimplestring = '1' $error = 'dol_eval try/catch error : '; $error .= $e->getMessage(); dol_syslog($error, LOG_WARNING); + if ($returnvalue) { + return 'Exception during evaluation: '.$s; + } else { + return ''; + } } } diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 6264dbf3f72..893195306fc 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -916,6 +916,7 @@ class Project extends CommonObject } else { dol_print_error($this->db); } + return -1; } /** diff --git a/htdocs/webportal/class/html.formwebportal.class.php b/htdocs/webportal/class/html.formwebportal.class.php index 0371f0694b8..d7f12bc735e 100644 --- a/htdocs/webportal/class/html.formwebportal.class.php +++ b/htdocs/webportal/class/html.formwebportal.class.php @@ -245,7 +245,7 @@ class FormWebPortal extends Form * @param string $filedir Full path to directory to scan * @param string $filter Filter filenames on this regex string (Example: '\.pdf$') * @param string $morecss Add more css to the download picto - * @param string $allfiles 0=Only generated docs, 1=All files + * @param int $allfiles 0=Only generated docs, 1=All files * @return string Output string with HTML link of documents (might be empty string). This also fill the array ->infofiles */ public function getDocumentsLink($modulepart, $modulesubdir, $filedir, $filter = '', $morecss = '', $allfiles = 0)