After upgrade from PHP 5.3 to PHP 5.4 of a Drupal 6.x version i get the following error when viewing a news section (taxonomy made)
Creating default object from empty value in /home/...../sites/all/modules/i18n/i18ntaxonomy/i18ntaxonomy.pages.inc on line 34.
From i18ntaxonomy.pages.inc:
if ($terms['tids']) {
// We need vid here, too.
$result = db_query(db_rewrite_sql('SELECT t.tid, t.vid, t.name FROM {term_data} t WHERE t.tid IN ('. db_placeholders($terms['tids']) .')', 't', 'tid'), $terms['tids']);
$tids = array(); // we rebuild the $tids-array so it only contains terms the user has access to.
$names = array();
while ($term = db_fetch_object($result)) {
$tids[] = $term->tid;
$names[] = i18ntaxonomy_translate_term_name($term);
}
if ($names) {
$title = check_plain(implode(', ', $names));
drupal_set_title($title);
switch ($op) {
case 'page':
// Build breadcrumb based on first hierarchy of first term:
here >>> $current->tid = $tids[0];
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | i18n-creating_default_object-2157743-2.patch | 655 bytes | jackalope |
Comments
Comment #1
sunfire-design commentedI tried this from i18n 7.
Replace
with
Comment #2
jackalope commentedThis problem exists in 6.x-1.10 as well. I took a slightly different approach than sunfire-design; my patch is attached.
Comment #3
arx-e commentedMet the same issue after upgrading php and the patch in #2 solved it.
Thanks!
Comment #4
jose reyero commented