Hi

I have a fresh install of Drupal 7.22, and Basic 7.x-3.3. I have the below errors pretty much constantly displayed, although everything is working fine.

I am not sure if I have missed something, if anyone knows what, or why and could let me know that would be great.

Notice: Undefined variable: language in basic_preprocess_html() (line 32 of D:\xampp\htdocs\bearbath\sites\all\themes\basic\template.php).
Notice: Trying to get property of non-object in basic_preprocess_html() (line 32 of D:\xampp\htdocs\bearbath\sites\all\themes\basic\template.php).
Notice: Undefined variable: language in basic_preprocess_html() (line 33 of D:\xampp\htdocs\bearbath\sites\all\themes\basic\template.php).
Notice: Trying to get property of non-object in basic_preprocess_html() (line 33 of D:\xampp\htdocs\bearbath\sites\all\themes\basic\template.php).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dazweeja’s picture

Looks like a bug to me. Line 22 in template.php should be:

global $user, $language;

dazweeja’s picture

Category: support » bug
steven.wichers’s picture

Status: Active » Needs review
FileSize
377 bytes

This is a bug. Here's a small patch to fix it.

mattys’s picture

thanks for that, sorted

sorry for delay in replying, i didn't receive a notification email

matt

dale42’s picture

This resolved the issue for me, as well.

lil.destro’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

Tested, works! will be rolled into next 7.x-3.x release.

lil.destro’s picture

Status: Reviewed & tested by the community » Closed (fixed)

closing, fixed in latest dev and will be rolled out in next stable version.

Globetrotter-1’s picture

I don't know what I might do wrong but I just got the newest version (basic-7.x-3.3) and this issue still exists.
I had a look on that patch, I am sorry if my coding ability aren't enough but I don't get which strip of code is supposed to go/or replace where/what. Would by very grateful if I get a hint on that...

I think a good idea would by to simply post here a untouched repaired basic-template.php code

dazweeja’s picture

@Globetrotter, the affected section is still line 22 in template.php (as of 7.x-3.4) and the repaired version is exactly as it's written in comment #1. If line 22 in the version you have is the same as comment #1, then you are experiencing a different bug.