Fix bug reported by scrutinizers
This commit is contained in:
parent
e57c8f324d
commit
1f4a079f01
@ -2959,6 +2959,8 @@ class Propal extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function demand_reason($demand_reason_id, $notrigger=0)
|
function demand_reason($demand_reason_id, $notrigger=0)
|
||||||
{
|
{
|
||||||
|
global $user;
|
||||||
|
|
||||||
if ($this->statut >= self::STATUS_DRAFT)
|
if ($this->statut >= self::STATUS_DRAFT)
|
||||||
{
|
{
|
||||||
$error=0;
|
$error=0;
|
||||||
|
|||||||
@ -1098,7 +1098,7 @@ if (empty($reshook))
|
|||||||
$exp = new Expedition($db);
|
$exp = new Expedition($db);
|
||||||
$exp->fetch($object->origin_id);
|
$exp->fetch($object->origin_id);
|
||||||
$exp->fetchObjectLinked();
|
$exp->fetchObjectLinked();
|
||||||
if (count($exp->linkedObjectsIds['commande']) > 0) {
|
if (is_array($exp->linkedObjectsIds['commande']) && count($exp->linkedObjectsIds['commande']) > 0) {
|
||||||
foreach ($exp->linkedObjectsIds['commande'] as $key => $value){
|
foreach ($exp->linkedObjectsIds['commande'] as $key => $value){
|
||||||
$object->linked_objects['commande'] = $value;
|
$object->linked_objects['commande'] = $value;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user