I'm getting the error:

Notice: Undefined property: stdClass::$biblio_type_of_work in _biblio_bibtex_import() (line 263 of ../sites/all/modules/biblio/modules/bibtexParse/biblio_bibtex.module).

When I try to import the google-books derived bibtex file:

@book{williamson2007macroeconomics,
  title={Macroeconomics},
  author={Williamson, S.D.},
  isbn={9780321416049},
  url={http://books.google.com/books?id=xSTQAQAACAAJ},
  year={2007},
  publisher={Pearson Education Canada}
}

This is after an OS upgrade, so I'm not sure if I messed something up. But if I look at the code. I see that there is a concatenation for this line:

http://drupalcode.org/project/biblio.git/blob/a180c0befe14c1eb48b56135c1...

Is this intentional? I'm not sure if I can tell why it would be. Removing the '.' seems to fix the error.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kpaxman’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
537 bytes

The issue seems to be that $node->biblio_type_of_work is not necessarily defined at this point. The attached patch makes $node->biblio_type_of_work an empty string if none of the conditions to define it are met, so the concatenation later on will always work without throwing a notice.

  • Liam Morland committed 2af0ea3 on 7.x-1.x
    Issue #2114935: Refactor: Ensure $node->biblio_type_of_work property is...
Liam Morland’s picture

Status: Needs review » Fixed

Thanks! This was fixed in #3030134: Make tests pass but your solution is better.

Status: Fixed » Closed (fixed)

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