Code Duplication    Length = 3-4 lines in 2 locations

htdocs/src/Oc/Cache/WebCache.php 2 locations

@@ 82-85 (lines=4) @@
79
                $opt['template']['locale'] = $sLanguage;
80
                \set_php_locale();
81
82
                if ($this->translate->t('INTERNAL_LANG', 'all', 'OcSmarty.class.php', '') !== $sLanguage) {
83
                    echo 'setlocale() failed to set language to ' . $sLanguage ."\n";
84
                    die("Is the translation of INTERNAL_LANG correct?\n");
85
                }
86
87
                // this will create the cache file
88
                $menu = new \Menu();
@@ 170-172 (lines=3) @@
167
        $opt['template']['locale'] = $sLanguage;
168
        \set_php_locale();
169
170
        if ($this->translate->t('INTERNAL_LANG', 'all', 'OcSmarty.class.php', '') != $sLanguage) {
171
            die('setlocale() failed to set language to ' . $sLanguage . ". Is the translation of INTERNAL_LANG correct?\n");
172
        }
173
174
        $preTemplate = new \OcSmarty();
175
        $preTemplate->name = $sTemplate;