Fixing notice errors caused by accessing headers in po files that

don't exist. Fixes #1515

Signed-off-by: mark_story <mark@mark-story.com>
This commit is contained in:
0x20h 2011-02-15 21:21:39 +01:00 committed by mark_story
parent ca3e606ec8
commit 0e7f2efdb1

View file

@ -321,8 +321,10 @@ class I18n extends Object {
$this->__domains[$domain][$this->__lang][$this->category] = array(); $this->__domains[$domain][$this->__lang][$this->category] = array();
return $domain; 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) { foreach (explode("\n", $head) as $line) {
$header = strtok($line,":"); $header = strtok($line,":");
$line = trim(strtok("\n")); $line = trim(strtok("\n"));