Skip to content

[Bibtex] Error: Call to a member function getLanguage() on null #190

@hktang

Description

@hktang

Please follow the general troubleshooting steps first:

  • I read the README and followed the instructions.
  • I am sure that the used CSL metadata follows the CSL schema.
  • I use a valid CSL stylesheet (bibtex.csl)

Bug reports:

Related to #184 , It seems CiteProc::getContext()->getLocale() is null when using bibtex.csl.

strtok(CiteProc::getContext()->getLocale()->getLanguage(), '-');

Proposal is to supply the default locale "en" if it does not exist, because strtok does not accept null any more.

strtok(CiteProc::getContext()->getLocale()?->getLanguage() ?? "en", '-');

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions