saved searches on search page, templates: Invalid argument supplied for foreach() on line 167

This commit is contained in:
Friendika 2011-09-08 21:42:52 -07:00
parent f03c2b1b79
commit 3f59f63224
3 changed files with 2825 additions and 348 deletions

View file

@ -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;
}