Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Changing empty() to !isset() to avoid additional cache hits when po f…
…iles are missing or empty.
  • Loading branch information
markstory committed Nov 16, 2010
1 parent 4c33375 commit 5349257
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cake/libs/i18n.php
Expand Up @@ -148,11 +148,11 @@ function translate($singular, $plural = null, $domain = null, $category = 6, $co

$_this->domain = $domain . '_' . $_this->l10n->lang;

if (empty($_this->__domains[$domain][$_this->__lang])) {
if (!isset($_this->__domains[$domain][$_this->__lang])) {
$_this->__domains[$domain][$_this->__lang] = Cache::read($_this->domain, '_cake_core_');
}

if (empty($_this->__domains[$domain][$_this->__lang][$_this->category])) {
if (!isset($_this->__domains[$domain][$_this->__lang][$_this->category])) {
$_this->__bindTextDomain($domain);
Cache::write($_this->domain, $_this->__domains[$domain][$_this->__lang], '_cake_core_');
}
Expand Down

0 comments on commit 5349257

Please sign in to comment.