Fix bugs reported by scrutinizer
This commit is contained in:
parent
bb81f66a1a
commit
f08c07f315
@ -1023,22 +1023,16 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable
|
||||
{
|
||||
case UPLOAD_ERR_INI_SIZE: // 1
|
||||
return 'ErrorFileSizeTooLarge';
|
||||
break;
|
||||
case UPLOAD_ERR_FORM_SIZE: // 2
|
||||
return 'ErrorFileSizeTooLarge';
|
||||
break;
|
||||
case UPLOAD_ERR_PARTIAL: // 3
|
||||
return 'ErrorPartialFile';
|
||||
break;
|
||||
case UPLOAD_ERR_NO_TMP_DIR: //
|
||||
return 'ErrorNoTmpDir';
|
||||
break;
|
||||
case UPLOAD_ERR_CANT_WRITE:
|
||||
return 'ErrorFailedToWriteInDir';
|
||||
break;
|
||||
case UPLOAD_ERR_EXTENSION:
|
||||
return 'ErrorUploadBlockedByAddon';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@ -51,12 +51,15 @@ class MenuManager
|
||||
|
||||
|
||||
/**
|
||||
* Load this->tabMenu
|
||||
*
|
||||
* @return void
|
||||
* Load this->tabMenu
|
||||
*
|
||||
* @param string $forcemainmenu To force mainmenu to load
|
||||
* @param string $forceleftmenu To force leftmenu to load
|
||||
* @return void
|
||||
*/
|
||||
public function loadMenu()
|
||||
public function loadMenu($forcemainmenu = '', $forceleftmenu = '')
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -761,7 +761,7 @@ class ImportCsv extends ModeleImports
|
||||
$lastinsertid = $res->rowid;
|
||||
$last_insert_id_array[$tablename] = $lastinsertid;
|
||||
} elseif($resql->num_rows > 1) {
|
||||
$this->errors[$error]['lib']=$langs->trans('MultipleRecordFoundWithTheseFilters', implode($filters, ', '));
|
||||
$this->errors[$error]['lib']=$langs->trans('MultipleRecordFoundWithTheseFilters', implode(', ', $filters));
|
||||
$this->errors[$error]['type']='SQL';
|
||||
$error++;
|
||||
} else {
|
||||
|
||||
@ -782,7 +782,7 @@ class ImportXlsx extends ModeleImports
|
||||
$lastinsertid = $res->rowid;
|
||||
$last_insert_id_array[$tablename] = $lastinsertid;
|
||||
} elseif($resql->num_rows > 1) {
|
||||
$this->errors[$error]['lib']=$langs->trans('MultipleRecordFoundWithTheseFilters', implode($filters, ', '));
|
||||
$this->errors[$error]['lib']=$langs->trans('MultipleRecordFoundWithTheseFilters', implode(', ', $filters));
|
||||
$this->errors[$error]['type']='SQL';
|
||||
$error++;
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user