diff --git a/themes/engines/phptemplate/phptemplate.engine b/themes/engines/phptemplate/phptemplate.engine index 366420fdd03..b58d9dcb999 100644 --- a/themes/engines/phptemplate/phptemplate.engine +++ b/themes/engines/phptemplate/phptemplate.engine @@ -51,7 +51,7 @@ function phptemplate_regions() { * @return * The HTML generated by the template system. */ -function _phptemplate_callback($hook, $variables = array(), $file = null) { +function _phptemplate_callback($hook, $variables = array(), $file = NULL) { $variables = array_merge($variables, _phptemplate_default_variables($hook, $variables)); @@ -169,7 +169,7 @@ function phptemplate_page($content) { if ($sidebar_right != '') { $layout = ($layout == 'left') ? 'both' : 'right'; } - $sidebar_indicator = null; + $sidebar_indicator = NULL; // Construct page title if (drupal_get_title()) { @@ -310,7 +310,7 @@ function phptemplate_box($title, $content, $region = 'main') { * @param $file * A suggested template file to use. */ -function _phptemplate_default($hook, $variables, $file = null) { +function _phptemplate_default($hook, $variables, $file = NULL) { if ($file && file_exists(path_to_theme() . "/$file.tpl.php")) { $file = path_to_theme() . "/$file.tpl.php"; } @@ -324,13 +324,14 @@ function _phptemplate_default($hook, $variables, $file = null) { } else { $variables['hook'] = $hook; - watchdog('error', 'PHPTemplate was instructed to override the ' . $hook . ' theme function, but no valid template file was found.'); + watchdog('error', t('PHPTemplate was instructed to override the %name theme function, but no valid template file was found.', array('%name' => theme('placeholder', $hook)))); $file = 'themes/engines/phptemplate/default.tpl.php'; } } } if ($file) { + unset($variables['file']); // Make sure we don't override $file extract($variables); // Extract the vars to local namespace ob_start(); // Start output buffering include($file); // Include the file