summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrandon Bergren2008-08-18 20:20:58 (GMT)
committer Brandon Bergren2008-08-18 20:20:58 (GMT)
commit9475d50102331281158960f2a8b013a3c8471ed0 (patch)
treedb530519eb4dea6addfb72857cbcb9f1cc6b10e4
parentc6b394f333a3334c9402201015670c847a77e08b (diff)
Fix warnings in previous.
-rw-r--r--location.module10
1 files changed, 6 insertions, 4 deletions
diff --git a/location.module b/location.module
index 0f36db9..45d17c3 100644
--- a/location.module
+++ b/location.module
@@ -1756,10 +1756,12 @@ function template_preprocess_location(&$variables) {
* Drupal 6 style theming helper.
*/
function _location_render($file, $variables) {
- foreach ($variables['template_files'] as $temp) {
- if (file_exists(drupal_get_path('module', 'location') ."/$temp.tpl.php")) {
- $file = $temp;
- break;
+ if (!empty($variables['template_files'])) {
+ foreach ($variables['template_files'] as $temp) {
+ if (file_exists(drupal_get_path('module', 'location') ."/$temp.tpl.php")) {
+ $file = $temp;
+ break;
+ }
}
}
extract($variables, EXTR_SKIP); // Extract the variables to a local namespace