Today I came across some error messages on my Search Results page because I was checking for a content type in my template.php file's preprocess_page function. Here's some code to to check that you're actually on a node prior to checking the content type.
Round Rock / Austin, Texas
Drupal Web Developer
Trouble Getting your 'GET' Variables to Work?
Always make sure you do some error checking before trying to use the GET variable!
In this example we are passing something like this: http://www.foxwebdevelopment.com?year=2104
In our code we want to validate by using 'isset' before actually trying to use the value. Otherwise php is going to barf and throw and error such as "Notice: Undefined index: .... $GET"
if(isset($_GET['year'])){
$year = $_GET['year'];
} else {
$year = '2012';
}