Refactor ID extraction logic in BuerklinProvider

This commit is contained in:
Marc 2026-02-08 23:10:14 +01:00 committed by GitHub
parent 46c2fe3aad
commit 5f65176636
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -661,10 +661,13 @@ class BuerklinProvider implements BatchInfoProviderInterface, URLHandlerInfoProv
if (strpos($path, '/p/') === false) {
return null;
}
// Reject "/.../p" and "/.../p/" (no actual ID)
if ($id === 'p' || $id === '') {
return null;
}
$id = basename(rtrim($path, '/'));
return $id !== '' ? $id : null;
return $id;
}
}