Posted by franqui on February 19, 2009 at 1:42pm
Jump to:
| 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
Thanks
It's been committed.
#2
Automatically closed -- issue fixed for 2 weeks with no activity.