Skip to content

Commit

Permalink
Fixing notice errors caused by accessing headers in po files that
Browse files Browse the repository at this point in the history
don't exist. Fixes #1515

Signed-off-by: mark_story <mark@mark-story.com>
  • Loading branch information
0x20h authored and markstory committed Feb 17, 2011
1 parent ca3e606 commit 0e7f2ef
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cake/libs/i18n.php
Expand Up @@ -321,8 +321,10 @@ function __bindTextDomain($domain) {
$this->__domains[$domain][$this->__lang][$this->category] = array();
return $domain;
}

if ($head = $this->__domains[$domain][$this->__lang][$this->category][""]) {

if (isset($this->__domains[$domain][$this->__lang][$this->category][""])) {
$head = $this->__domains[$domain][$this->__lang][$this->category][""];

foreach (explode("\n", $head) as $line) {
$header = strtok($line,":");
$line = trim(strtok("\n"));
Expand Down

0 comments on commit 0e7f2ef

Please sign in to comment.