From 5e8bba346331dd5a703c0d0e06cde24c74def962 Mon Sep 17 00:00:00 2001
From: Julian Maurice <julian.maurice@biblibre.com>
Date: Tue, 17 Feb 2015 10:38:43 +0100
Subject: [PATCH] Fix Trait_Indexable::unindex for PHP < 5.5

---
 library/Trait/Indexable.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/library/Trait/Indexable.php b/library/Trait/Indexable.php
index f2334fb54e4..8120e7b975c 100644
--- a/library/Trait/Indexable.php
+++ b/library/Trait/Indexable.php
@@ -59,7 +59,8 @@ trait Trait_Indexable {
 	public function unindex() {
 		$alpha_key = $this->getAlphaKey();
 
-		if (empty($domains = $this->getDomaines())) {
+		$domains = $this->getDomaines();
+		if (empty($domains)) {
 			Class_NoticeDomain::deleteBy(['record_alpha_key' => $alpha_key,
 																		'panier_id' => 0]);
 		}
-- 
GitLab