From 1e5a9b18f0cbef5092b95378e34ad8e7eaf0c7e7 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 3 Jan 2015 20:25:38 +0200 Subject: Fix #3453 Allow hyphens and underscores in language idioms. --- system/core/Lang.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system') diff --git a/system/core/Lang.php b/system/core/Lang.php index c0cd34a3d..9aaf944ce 100644 --- a/system/core/Lang.php +++ b/system/core/Lang.php @@ -106,7 +106,7 @@ class CI_Lang { $langfile .= '.php'; - if (empty($idiom) OR ! ctype_alpha($idiom)) + if (empty($idiom) OR ! preg_match('/^[a-z_-]$/i', $idiom)) { $config =& get_config(); $idiom = empty($config['language']) ? 'english' : $config['language']; -- cgit v1.2.3-24-g4f1b