Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292250

_theme() does not trigger an error when a theme hook is not found

$
0
0

The theme function looks a bit like this:

  // Generate the output using either a function or a template.
  if (isset($info['function'])) {
    if (function_exists($info['function'])) {
      $output = $info['function']($variables);
    }
  }
  else {
  ..
    // Render the output using the found template file.
    $output = $render_function($template_file, $variables);
  }
return $output;

if $info['function'] doesn't exist, a notice will be thrown:
Notice: Undefined variable: output in theme() (line 932 of /home/nsh/drupal7/drupal/includes/theme.inc).


Viewing all articles
Browse latest Browse all 292250

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>