Error when importing bibliography from BibTeX file whith additional taxonomy terms

franqui - February 19, 2009 - 13:42
Project:Bibliography Module
Version:6.x-1.0-rc5
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

I got an error when importing a BibTeX file adding my own taxonomy terms. It was an error in line 657 of the file PARSEENTRIES.PHP, if I remember well, about an undefined array in an array_merge function call.

The thing is that one of the arguments, $node['taxonomy'], was undefined. It can be easily solved adding an isSet check:

<?php
     
if (!empty($terms)) {
        if(!isSet(
$node['taxonomy']))
         
$node['taxonomy'] = Array();
         
$node['taxonomy'] = array_merge($terms,$node['taxonomy']);
      }
?>

Replacing the old code

<?php
     
if (!empty($terms))
         
$node['taxonomy'] = array_merge($terms,$node['taxonomy']);
?>

#1

rjerome - February 20, 2009 - 03:26
Status:needs review» fixed

Thanks

It's been committed.

#2

System Message - March 6, 2009 - 03:30
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.