not enough test

can be a problem with objects who don't have required socid
Furthermore it is impossible to unset a property : https://www.php.net/manual/en/function.property-exists.php#116824
This commit is contained in:
Norbert Penel 2025-02-11 15:44:46 +01:00 committed by GitHub
parent a4e39ba1be
commit ef802d426e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5387,7 +5387,7 @@ abstract class CommonObject
// Define output language and label
if (getDolGlobalInt('MAIN_MULTILANGS')) {
if (property_exists($this, 'socid') && !is_object($this->thirdparty)) {
if (property_exists($this, 'socid') && !empty($this->socid) && !is_object($this->thirdparty)) {
dol_print_error(null, 'Error: Method printObjectLine was called on an object and object->fetch_thirdparty was not done before');
return;
}