iterate in $data until fields for empty relation are over
All checks were successful
soko-web/pipeline/pr-master This commit looks good

This commit is contained in:
Bence Pőcze 2023-05-28 15:29:28 +02:00
parent 78f891fbff
commit 15f7b1e9a2
Signed by: bence
GPG Key ID: DC5BD6E95A333E6D

View File

@ -278,7 +278,10 @@ class PersistentDataManager implements IPersistentDataManager
$method = 'set' . str_replace('_', '', ucwords($relation, '_'));
$model->$method($relationModel);
} else {
next($data);
while (substr($key, 0, strlen($relation . '__')) === $relation . '__') {
next($data);
$key = key($data);
}
}
next($relations);