From 0ec977a02b3614ded8c54fbd47ff86dc502ade34 Mon Sep 17 00:00:00 2001 From: "mariano.iglesias" Date: Sat, 1 Nov 2008 14:16:06 +0000 Subject: [PATCH] Small performance optimization to previous commit git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7818 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/multibyte.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cake/libs/multibyte.php b/cake/libs/multibyte.php index 2a6c0b0e0..324c4d578 100644 --- a/cake/libs/multibyte.php +++ b/cake/libs/multibyte.php @@ -23,8 +23,11 @@ * @lastmodified $Date$ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ -if (function_exists('mb_internal_encoding') && Configure::read('App.encoding') != null) { - mb_internal_encoding(Configure::read('App.encoding')); +if (function_exists('mb_internal_encoding')) { + $encoding = Configure::read('App.encoding'); + if (!empty($encoding)) { + mb_internal_encoding($encoding); + } } /** * Find position of first occurrence of a case-insensitive string.