0

In my Drupal 7 website I get this error in reports/Recent log messages: Notice: Undefined variable: crumbs in breadcrumb() (line 88 of /home/public_html/sites/all/themes/mytheme/template.php).

Now,this is the piece of code in template.php:

function mytheme_breadcrumb($variables, $page) {
    $count = '100';
    $breadcrumb = $variables['breadcrumb'];

    if (!empty($breadcrumb)) {
        foreach($breadcrumb as $value) {
            $count = $count - 1;
            $style = ' style="z-index:'.$count.';"';
            $pos = strpos( $value, ">"); 
            $temp1 = substr($value,0,$pos);
            $temp2 = substr($value,$pos,$pos);
            $crumbs .= $value.'← ';
        }  
    }
    return $crumbs;
}

How to get rid of these messages?

Qirel
  • 25,449
  • 7
  • 45
  • 62

0 Answers0