Importing bibtex files, I sometimes get this error in the log:
Invalid argument supplied for foreach() in /var/www/vhosts/xxxx/sites/all/modules/biblio/bibtexParse/PARSEENTRIES.php on line 178.
I determined that the cause was that the PARSENTRIES object property transtab_latex_unicode was sometimes not set. This is loaded in the constructor function via a require_once include (line 141).
I'm not sure why this could not be a class property, but as a workaround to the current implementation I found that changing the require_once to a require eliminated the problem.
--- sites/all/modules/biblio/bibtexParse/PARSEENTRIES.php (revision 1169)
+++ sites/all/modules/biblio/bibtexParse/PARSEENTRIES.php (working copy)
@@ -138,7 +138,7 @@
*/
function PARSEENTRIES()
{
- require_once(drupal_get_path('module', 'biblio') . '/bibtexParse/transtab_latex_unicode.inc.php');
+ require(drupal_get_path('module', 'biblio') . '/bibtexParse/transtab_latex_unicode.inc.php');
$this->preamble = $this->strings = $this->undefinedStrings = $this->entries = array();
$this->count = 0;
$this->fieldExtract = TRUE;
Comments
Comment #1
liam morlandThis version is no longer maintained. If this issue is still relevant to the Drupal 7 version, please re-open and provide details.