Merge pull request #1100 from nlegoff/fix-146

[READY][3.8.6][PHRAS-146] Order of a basket generates an error when the content come...
This commit is contained in:
Nicolas Le Goff
2014-08-18 10:50:36 +02:00

View File

@@ -155,9 +155,10 @@ class Order implements ControllerProviderInterface
try {
$records = RecordsRequest::fromRequest($app, $request, true, array('cancmd'));
$query = new \User_Query($app);
foreach ($records as $key => $record) {
$query = new \User_Query($app);
if ($collectionHasOrderAdmins->containsKey($record->get_base_id())) {
if (!$collectionHasOrderAdmins->get($record->get_base_id())) {
$records->remove($key);
@@ -182,8 +183,8 @@ class Order implements ControllerProviderInterface
}
$noAdmins = $collectionHasOrderAdmins->forAll(function ($key, $hasAdmin) {
return false === $hasAdmin;
});
return false === $hasAdmin;
});
if ($noAdmins) {
$msg = _('There is no one to validate orders, please contact an administrator');