Skip to content
Snippets Groups Projects
Commit d7f5a116 authored by VESSILLER's avatar VESSILLER
Browse files

FIX fetch WrongParameters on creating ticket (TS2408-10250)

parent e3dab971
No related branches found
No related tags found
2 merge requests!392024 rc,!38FIX fetch WrongParameters on creating ticket (TS2408-10250)
Pipeline #3333 passed with warnings
......@@ -3,6 +3,9 @@ Le format du fichier est basé sur [Tenez un ChangeLog](http://keepachangelog.co
## [Non Distribué]
## [14.0.8] - 02-09-2024
- Correction de l'erreur fetch WrongParameters lors de la création d'un ticket (TS2408-10250)
## [14.0.7] - 10-06-2024
- Ajout version PHP.
......@@ -85,7 +88,8 @@ Le format du fichier est basé sur [Tenez un ChangeLog](http://keepachangelog.co
## [7.0.0] - 15-11-2019
- Version initial.
[Non Distribué]: http://git.open-dsi.fr/dolibarr-extension/documentstray/compare/14.0.7...HEAD
[Non Distribué]: http://git.open-dsi.fr/dolibarr-extension/documentstray/compare/14.0.8...HEAD
[14.0.8]: http://git.open-dsi.fr/dolibarr-extension/documentstray/commits/14.0.8
[14.0.7]: http://git.open-dsi.fr/dolibarr-extension/documentstray/commits/14.0.7
[14.0.6]: http://git.open-dsi.fr/dolibarr-extension/documentstray/commits/14.0.6
[14.0.5]: http://git.open-dsi.fr/dolibarr-extension/documentstray/commits/14.0.5
......
14.0.7
\ No newline at end of file
14.0.8
\ No newline at end of file
......@@ -201,8 +201,12 @@ function opendsi_get_object($db, $element_type, $element_id)
if (dol_include_once('/' . $element_prop['classpath'] . '/' . $element_prop['classfile'] . '.class.php')) {
if (class_exists($element_prop['classname'], false)) {
$objecttmp = new $element_prop['classname']($db);
$ret = $objecttmp->fetch($element_id);
if ($ret >= 0) {
if ($element_id > 0) {
$ret = $objecttmp->fetch($element_id);
if ($ret >= 0) {
return $objecttmp;
}
} else {
return $objecttmp;
}
}
......@@ -274,9 +278,11 @@ function opendsi_get_object($db, $element_type, $element_id)
}
$srcobject = new $classname($db);
$result = $srcobject->fetch($element_id);
if ($result < 0) {
return -1;
if ($element_id > 0) {
$result = $srcobject->fetch($element_id);
if ($result < 0) {
return -1;
}
}
return $srcobject;
......
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