Open glorieux-f opened 1 year ago
Other bug in Sort, l. 116, if a sort variable is not available.
Getting this too: Warning: Undefined property: stdClass::$status in /app/vendor/seboettg/citeproc-php/src/Style/Sort/Sort.php on line 126 Deprecated: strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated in /app/vendor/seboettg/citeproc-php/src/Style/Sort/Sort.php on line 126
Line 126 is:
$sortKey = mb_strtolower(strip_tags($dataItem->{$variable}));
I would recommend adding defensive code:
$sortKey = '';
if(isset($dataItem->{$variable}) && is_string($dataItem->{$variable})) {
$sortKey = mb_strtolower(strip_tags($dataItem->{$variable}));
}
Please follow the general troubleshooting steps first:
Bug reports:
In apa.csl#L285 we can read « APA sorts 1. no-date items, 2. items with dates, 3. in-press (status) items ». Your sort algorithm seems (sorry, I have not dig it fully) to suppose that the status property is always available. « Undefined property: stdClass::$status in Style\Sort\Sort.php on line 126 ».
Used CSL stylesheet:
apa.csl
Used CSL metadata
Minimum CSL data to reproduce the bug.