diff options
author | Friendika <info@friendika.com> | 2011-09-08 21:42:52 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-09-08 21:42:52 -0700 |
commit | 3f59f632241d14b43ba8861033aac27dfcfbc9e3 (patch) | |
tree | 89fc6df4fddeb248f736ec7ce08e601be7d6c337 /include/template_processor.php | |
parent | f03c2b1b79b4a0b242b4e74cc25eb158cf40decb (diff) | |
download | volse-hubzilla-3f59f632241d14b43ba8861033aac27dfcfbc9e3.tar.gz volse-hubzilla-3f59f632241d14b43ba8861033aac27dfcfbc9e3.tar.bz2 volse-hubzilla-3f59f632241d14b43ba8861033aac27dfcfbc9e3.zip |
saved searches on search page, templates: Invalid argument supplied for foreach() on line 167
Diffstat (limited to 'include/template_processor.php')
-rw-r--r-- | include/template_processor.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/template_processor.php b/include/template_processor.php index 459ffb2d1..dc5c24de3 100644 --- a/include/template_processor.php +++ b/include/template_processor.php @@ -164,9 +164,11 @@ $a = get_app(); $this->lang=array(); - foreach ($a->strings as $k=>$v){ - $k = preg_replace("/[^a-z0-9-]/", "", str_replace(" ","-", strtolower($k))); - $this->lang[$k] = $v; + if(is_array($a->strings) && count($a->strings)) { + foreach ($a->strings as $k=>$v){ + $k = preg_replace("/[^a-z0-9-]/", "", str_replace(" ","-", strtolower($k))); + $this->lang[$k] = $v; + } } return $this->lang; } |