From f02349154f108d9d7f1338d626a3cf2881683992 Mon Sep 17 00:00:00 2001 From: Moritz Schubotz Date: Tue, 7 Mar 2023 15:29:38 +0100 Subject: [PATCH] Minor: Improvement to bibtex-to-cff (#120) --- bibtex-to-cff.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bibtex-to-cff.php b/bibtex-to-cff.php index b795e0b..0e88ff1 100755 --- a/bibtex-to-cff.php +++ b/bibtex-to-cff.php @@ -1,10 +1,10 @@ this creates a file CITATION.cff for @xx{classical, $_GET['library']=1; @@ -14,13 +14,16 @@ function bibtexbrowser_cff($arguments) { $db = new BibDataBase(); $db->load($arguments[1]); $current_entry=NULL; - $current_field=NULL; for ($i=2;$igetEntryByKey($arguments[$i+1]); } } + if (is_null($current_entry)) { + echo "Did not find entry specified in the --id argument."; + return; + } echo $current_entry->toCFF(); }