From dd277d846f47554ece29d443a0e33ca5199f818a Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Tue, 10 Mar 2015 08:50:26 -0400
Subject: [PATCH] Allow parent data to be loaded at each step of the path
 stack. - Provides more consistent/understandable behavior

---
 .../src/VuFind/I18n/Translator/Loader/ExtendedIni.php     | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/module/VuFind/src/VuFind/I18n/Translator/Loader/ExtendedIni.php b/module/VuFind/src/VuFind/I18n/Translator/Loader/ExtendedIni.php
index 1d55af81822..e2253244e00 100644
--- a/module/VuFind/src/VuFind/I18n/Translator/Loader/ExtendedIni.php
+++ b/module/VuFind/src/VuFind/I18n/Translator/Loader/ExtendedIni.php
@@ -165,7 +165,10 @@ class ExtendedIni implements FileLoaderInterface
         $data = false;
         foreach ($this->pathStack as $path) {
             if (file_exists($path . '/' . $filename)) {
-                $current = $this->reader->getTextDomain($path . '/' . $filename);
+                // Load current file with parent data, if necessary:
+                $current = $this->loadParentData(
+                    $this->reader->getTextDomain($path . '/' . $filename)
+                );
                 if ($data === false) {
                     $data = $current;
                 } else {
@@ -177,8 +180,7 @@ class ExtendedIni implements FileLoaderInterface
             throw new InvalidArgumentException("Ini file '{$filename}' not found");
         }
 
-        // Load parent data, if necessary:
-        return $this->loadParentData($data);
+        return $data;
     }
 
     /**
-- 
GitLab