mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-23 15:51:42 +00:00
:octocat: Byte: string "0" fails with empty()
This commit is contained in:
+1
-1
@@ -38,7 +38,7 @@ final class Byte extends QRDataModeAbstract{
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function validateString(string $string):bool{
|
||||
return !empty($string);
|
||||
return $string !== '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,6 +27,7 @@ final class ByteTest extends DatainterfaceTestAbstract{
|
||||
return [
|
||||
["\x01\x02\x03", true],
|
||||
[' ', true], // not empty!
|
||||
['0', true], // should survive !empty()
|
||||
['', false],
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user