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];

Comments

sunfire-design’s picture

I tried this from i18n 7.

Replace

$current->tid = $tids[0];

with

$current = (object) array(
  'tid' => $tids[0],
);
jackalope’s picture

Version: 6.x-1.0 » 6.x-1.10
StatusFileSize
new655 bytes

This problem exists in 6.x-1.10 as well. I took a slightly different approach than sunfire-design; my patch is attached.

arx-e’s picture

Met the same issue after upgrading php and the patch in #2 solved it.
Thanks!

jose reyero’s picture

Status: Active » Closed (outdated)