Skip to content

Commit 9ac6f35

Browse files
committed
BUG: Guard empty input to prevent IndexError
1 parent bc318d7 commit 9ac6f35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pypdf/_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777

7878
def parse_iso8824_date(text: Optional[str]) -> Optional[datetime]:
7979
orgtext = text
80-
if text is None:
80+
if not text:
8181
return None
8282
if text[0].isdigit():
8383
text = "D:" + text

0 commit comments

Comments
 (0)