Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I get the following error on enabling the Basic theme on my D7 website
Notice: Uninitialized string offset: 0 in basic_id_safe() (regel 120 van /var/www/d7/sites/all/themes/basic/template.php
It refers to is
function basic_id_safe($string) {
// Replace with dashes anything that isn't A-Z, numbers, dashes, or underscores.
$string = strtolower(preg_replace('/[^a-zA-Z0-9_-]+/', '-', $string));
// If the first character is not a-z, add 'n' in front.
if (!ctype_lower($string{0})) { // Don't use ctype_alpha since its locale aware.
$string = 'id'. $string;
}
return $string;
}
Comments
Comment #1
e-m-h CreditAttribution: e-m-h commentedAlso am seeing this error. After a little research found that there are some new functions in D7 that handle cleaning up classes. Replacing the above function with this seems to do this trick:
References: http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_ht... and http://drupal.org/node/624046
Comment #2
see15_aug CreditAttribution: see15_aug commentedThanks. It's helps me
Comment #3
SteveK CreditAttribution: SteveK commentedthanks. pushed to dev.
Comment #5
coozila CreditAttribution: coozila commentedtanks its help me
Comment #6
calvez CreditAttribution: calvez commentedThank you, it's applicable to:
http://www.templatemonster.com/drupal-themes/53894.html
Comment #7
Kat_bast CreditAttribution: Kat_bast commentedThanks it worked for template monster theme822