Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | prevent-notice-2114935-1.patch | 537 bytes | kpaxman |
|
Comments
Comment #1
kpaxman CreditAttribution: kpaxman commentedThe 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.
Comment #3
Liam MorlandThanks! This was fixed in #3030134: Make tests pass but your solution is better.