mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
FIX Get array value for arrayname in loop. (#26805)
Reported by phan: htdocs/mrp/class/api_mos.class.php:369 PhanTypeMismatchForeach 'arraytoconsume'|'arraytoproduce' passed to foreach instead of array
This commit is contained in:
parent
a8b2c631ab
commit
ff44558e36
|
|
@ -366,7 +366,7 @@ class Mos extends DolibarrApi
|
|||
$pos = 0;
|
||||
$arrayofarrayname = array("arraytoconsume","arraytoproduce");
|
||||
foreach ($arrayofarrayname as $arrayname) {
|
||||
foreach ($arrayname as $value) {
|
||||
foreach (${$arrayname} as $value) {
|
||||
$tmpproduct = new Product($this->db);
|
||||
if (empty($value["objectid"])) {
|
||||
throw new RestException(500, "Field objectid required in ".$arrayname);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user