In wabi, pixture and twilight, undefined variables give E_ALL notices

robertDouglass - April 25, 2008 - 09:13
Project:Wabi
Version:6.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:pixture
Status:closed
Description

The change I made to get the buggers to go away:

<?php
/**
* Override or insert PHPTemplate variables into the templates.
*/
function phptemplate_preprocess_page(&$vars) {
 
// Hook into color.module
 
if (module_exists('color')) {
   
_color_page_alter($vars);
  }
 
// Avoid E_ALL notices
 
if (empty($vars['node'])) {
   
$vars['node'] = FALSE;
  }
  if (empty(
$vars['content_top'])) {
   
$vars['content_top'] = FALSE;
  }
}
?>

#1

pixture - April 25, 2008 - 13:18
Status:patch (code needs review)» fixed

Hi, thank you for the bug report and code patch.

Although your code will solve E_ALL notice issue, I want to fix them fundamentally so I modified page.tpl.php.

$content-top was the left over of my other themes and it is not necessary to be there with these themes.
So I got rid of it from page.tpl.php. I also changed if($node) to if(!empty($node)) to avoid E_ALL notice in page.tpl.php.

I have just released this fix for all three themes. (revision 6.x-1.1)
Again, thank you for the bug report and your code.

#2

robertDouglass - April 25, 2008 - 16:41

Woohoo! The very model of a modern major theme maintainer =D

#3

pixture - April 27, 2008 - 14:35
Version:6.x-1.0» 6.x-1.1
Assigned to:Anonymous» pixture
Status:fixed» closed

Since the bug was fixed, I think I should close this thread.

 
 

Drupal is a registered trademark of Dries Buytaert.