Download & Extend

Error when importing bibliography from BibTeX file whith additional taxonomy terms

Project:Bibliography Module
Version:6.x-1.0-rc5
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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']);
?>

Comments

#1

Status:needs review» fixed

Thanks

It's been committed.

#2

Status:fixed» closed (fixed)

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

nobody click here