Skip to content

Commit 203bb5c

Browse files
committed
Fix: 0 was considered as empty value
1 parent f7c2e02 commit 203bb5c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ UNRELEASED
55
------------------
66

77
- Fix unexpected behavior with comments
8+
- Fix: 0 was considered as empty value
89

910

1011
1.1.1 (2024-06-24)

src/Converter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ protected static function canUseNameAsId(string $name): bool
443443

444444
protected static function isEmpty(string $value): bool
445445
{
446-
return empty($value) || \in_array(strtolower($value), ["''", '""', 'false', 'null']);
446+
return \in_array(strtolower($value), ['', "''", '""', 'false', 'null']);
447447
}
448448

449449
/**

0 commit comments

Comments
 (0)