Issue #1723828 by hass: Fixed incorrect log message when theme() is called for a theme hook that does not exist.

merge-requests/26/head
David Rothstein 2013-03-30 15:03:18 -04:00
parent c6a5487a90
commit 815faefa64
2 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,8 @@
Drupal 7.22, xxxx-xx-xx (development version) Drupal 7.22, xxxx-xx-xx (development version)
----------------------- -----------------------
- Fixed incorrect log message when theme() is called for a theme hook that does
not exist (minor string change).
- Fixed Drupal's token-replacement system to allow spaces in the token value. - Fixed Drupal's token-replacement system to allow spaces in the token value.
- Changed the default behavior after a user creates a node they do not have - Changed the default behavior after a user creates a node they do not have
access to view. The user will now be redirected to the front page rather than access to view. The user will now be redirected to the front page rather than

View File

@ -769,7 +769,7 @@ function _theme_build_registry($theme, $base_theme, $theme_engine) {
* their base theme), direct sub-themes of sub-themes, etc. The keys are * their base theme), direct sub-themes of sub-themes, etc. The keys are
* the themes' machine names, and the values are the themes' human-readable * the themes' machine names, and the values are the themes' human-readable
* names. This element is not set if there are no themes on the system that * names. This element is not set if there are no themes on the system that
* declare this theme as their base theme. * declare this theme as their base theme.
*/ */
function list_themes($refresh = FALSE) { function list_themes($refresh = FALSE) {
$list = &drupal_static(__FUNCTION__, array()); $list = &drupal_static(__FUNCTION__, array());
@ -1033,7 +1033,7 @@ function theme($hook, $variables = array()) {
// Only log a message when not trying theme suggestions ($hook being an // Only log a message when not trying theme suggestions ($hook being an
// array). // array).
if (!isset($candidate)) { if (!isset($candidate)) {
watchdog('theme', 'Theme key "@key" not found.', array('@key' => $hook), WATCHDOG_WARNING); watchdog('theme', 'Theme hook %hook not found.', array('%hook' => $hook), WATCHDOG_WARNING);
} }
return ''; return '';
} }