Commit 32d957b4 authored by Penny Leach's avatar Penny Leach
Browse files

fixed warnings

parent d5bf5ecb
......@@ -108,9 +108,10 @@ function template_locate($templatename, $fetchdb=true) {
break;
}
}
$dbstuff = get_record('template', 'name', $templatename);
$template['cacheddata'] = unserialize($dbstuff->cacheddata);
$template['category'] = $dbstuff->category;
if ($dbstuff = get_record('template', 'name', $templatename)) {
$template['cacheddata'] = unserialize($dbstuff->cacheddata);
$template['category'] = $dbstuff->category;
}
$template['location'] = get_config('datarootroot') . 'templates/' . $templatename . '/';
return $template;
}
......@@ -126,9 +127,10 @@ function template_locate($templatename, $fetchdb=true) {
break;
}
}
$dbstuff = get_record('template', 'name', $templatename);
$template['cacheddata'] = unserialize($dbstuff->cacheddata);
$template['category'] = $dbstuff->category;
if ($dbstuff = get_record('template', 'name', $templatename)) {
$template['cacheddata'] = unserialize($dbstuff->cacheddata);
$template['category'] = $dbstuff->category;
}
$template['location'] = get_config('libroot') . 'templates/' . $templatename . '/';
return $template;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment