From fc63d7daa4cf3d74e91b93ad51510ffc9f02c078 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Thu, 4 Feb 2016 14:37:59 +0100 Subject: [PATCH] reset should be called on a variable. PHRAS-938 --- lib/Alchemy/Phrasea/Controller/Prod/PropertyController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Alchemy/Phrasea/Controller/Prod/PropertyController.php b/lib/Alchemy/Phrasea/Controller/Prod/PropertyController.php index 5d2b670f9f..f368b24046 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/PropertyController.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/PropertyController.php @@ -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 = [];