diff --git a/htdocs/admin/pdf_other.php b/htdocs/admin/pdf_other.php index 601e35bb846..3d477c6d43c 100644 --- a/htdocs/admin/pdf_other.php +++ b/htdocs/admin/pdf_other.php @@ -179,7 +179,7 @@ if ($action == 'update') { $dirforterms = $diroffile.'/'; $original_file = $_FILES[$varname]["name"]; $result = dol_move_uploaded_file($_FILES[$varname]["tmp_name"], $dirforterms.$original_file, 1, 0, $_FILES[$varname]['error']); - if ($result > 0) { + if ((int) $result > 0) { dolibarr_set_const($db, $varname, $original_file, 'chaine', 0, '', $conf->entity); } } diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 88e2eb965ca..46721f1ab89 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -2920,6 +2920,8 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } elseif ($modulepart == 'expedition' && strpos($original_file, 'receipt/') === 0) { // Fix modulepart delivery $modulepart = 'delivery'; + } elseif ($modulepart == 'propale') { + $modulepart = 'propal'; } //print 'dol_check_secure_access_document modulepart='.$modulepart.' original_file='.$original_file.' entity='.$entity; diff --git a/htdocs/margin/productMargins.php b/htdocs/margin/productMargins.php index 459a1376dfb..578d2dfad9d 100644 --- a/htdocs/margin/productMargins.php +++ b/htdocs/margin/productMargins.php @@ -127,7 +127,7 @@ print ''; // Product print ''; print ''; // Categories diff --git a/test/phpunit/SecurityGETPOSTTest.php b/test/phpunit/SecurityGETPOSTTest.php index cf9df8050cf..349522241be 100644 --- a/test/phpunit/SecurityGETPOSTTest.php +++ b/test/phpunit/SecurityGETPOSTTest.php @@ -507,7 +507,7 @@ class SecurityGETPOSTTest extends CommonClassTest // Test that links not on wrapper and not data are disallowed $result = GETPOST("paramtestsubstit", 'alphanohtml'); print __METHOD__." result=".$result."\n"; - $this->assertEquals('XXX XXX 999 XXX 1 XXX 1 XXX', $result, 'Failed to do conversion'); + $this->assertEquals('XXX __NOTDEFINED__ XXX 999 XXX 1 XXX 1 XXX', $result, 'Failed to do conversion'); return $result;
'.$langs->trans('ProductOrService').''; -print img_picto('', 'product', 'class="pictofixedwidth"').$form->select_produits(($id > 0 ? $id : ''), 'id', '', 20, 0, 1, 2, '', 1, array(), 0, '', 0, '', 0, '', null, 1); +print img_picto('', 'product', 'class="pictofixedwidth"').$form->select_produits(($id > 0 ? $id : ''), 'id', '', 20, 0, 1, 2, '', 1, array(), 0, 1, 0, '', 0, '', null, 1); print '