mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-07 17:42:53 +01:00
fix : 19.0 fix inconsistent link validation (#30141)
* Dirty fix for inconcistant link psedo langage * add todo * Update commonobject.class.php * Update commonobject.class.php --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
@@ -8495,7 +8495,14 @@ abstract class CommonObject
|
||||
$classname = $InfoFieldList[0];
|
||||
$classpath = $InfoFieldList[1];
|
||||
if (!$validate->isFetchable($fieldValue, $classname, $classpath)) {
|
||||
$this->setFieldError($fieldKey, $validate->error);
|
||||
$lastIsFetchableError = $validate->error;
|
||||
|
||||
// from V19 of Dolibarr, In some cases link use element instead of class, example project_task
|
||||
if ($validate->isFetchableElement($fieldValue, $classname)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$this->setFieldError($fieldKey, $lastIsFetchableError);
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user