reset should be called on a variable.

PHRAS-938
This commit is contained in:
Benoît Burnichon
2016-02-04 14:37:59 +01:00
parent a37cf9029c
commit fc63d7daa4

View File

@@ -30,13 +30,14 @@ class PropertyController extends Controller
$records = RecordsRequest::fromRequest($this->app, $request, false, ['chgstatus']);
if (count($records->databoxes()) > 1) {
$databoxes = $records->databoxes();
if (count($databoxes) > 1) {
return new Response($this->render('prod/actions/Property/index.html.twig', [
'records' => $records,
]));
}
$databox = reset($records->databoxes());
$databox = reset($databoxes);
$statusStructure = $databox->getStatusStructure();
$recordsStatuses = [];