Update commonobject.class.php
This commit is contained in:
parent
c655720b78
commit
da481049c1
@ -7898,11 +7898,13 @@ abstract class CommonObject
|
|||||||
$deleteMethod=$deleteFromObject[2];
|
$deleteMethod=$deleteFromObject[2];
|
||||||
if (dol_include_once($filePath)) {
|
if (dol_include_once($filePath)) {
|
||||||
$childObject = new $className($this->db);
|
$childObject = new $className($this->db);
|
||||||
$result= $childObject->{$deleteMethod}($this->id);
|
if (method_exists($childObject, $deleteMethod)) {
|
||||||
if ($result<0) {
|
$result= $childObject->{$deleteMethod}($this->id);
|
||||||
$this->errors[] = $childObject->error;
|
if ($result<0) {
|
||||||
return -1;
|
$this->errors[] = $childObject->error;
|
||||||
}
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->errors[] = 'Cannot find child class file ' .$filePath;
|
$this->errors[] = 'Cannot find child class file ' .$filePath;
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user