Skip to content

Commit 283472d

Browse files
committed
update dependencies
1 parent 822c207 commit 283472d

13 files changed

Lines changed: 22 additions & 22 deletions

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.4.25
1+
2.4.26

src/Type/Linear/Codabar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ protected function setBars(): void
9191
for ($chr = 0; $chr < $clen; ++$chr) {
9292
$char = $this->extcode[$chr];
9393
if (! isset($this::CHBAR[$char])) {
94-
throw new BarcodeException('Invalid character: \chr(' . \ord($char) . ')');
94+
throw new BarcodeException('Invalid character: \chr(' . (\ord($char) & 0xFF) . ')');
9595
}
9696

9797
for ($pos = 0; $pos < 8; ++$pos) {

src/Type/Linear/CodeOneOne.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ protected function setBars(): void
136136
for ($chr = 0; $chr < $clen; ++$chr) {
137137
$char = $this->extcode[$chr];
138138
if (! isset($this::CHBAR[$char])) {
139-
throw new BarcodeException('Invalid character: \chr(' . \ord($char) . ')');
139+
throw new BarcodeException('Invalid character: \chr(' . (\ord($char) & 0xFF) . ')');
140140
}
141141

142142
for ($pos = 0; $pos < 6; ++$pos) {

src/Type/Linear/CodeThreeNineExtCheck.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ protected function getExtendCode(string $code): string
294294
for ($chr = 0; $chr < $clen; ++$chr) {
295295
$item = \ord($code[$chr]);
296296
if ($item > 127) {
297-
throw new BarcodeException('Invalid character: \chr(' . $item . ')');
297+
throw new BarcodeException('Invalid character: \chr(' . ($item & 0xFF) . ')');
298298
}
299299

300300
$ext .= $this::EXTCODES[$item];
@@ -347,7 +347,7 @@ protected function setBars(): void
347347
for ($chr = 0; $chr < $clen; ++$chr) {
348348
$char = $this->extcode[$chr];
349349
if (! isset($this::CHBAR[$char])) {
350-
throw new BarcodeException('Invalid character: \chr(' . \ord($char) . ')');
350+
throw new BarcodeException('Invalid character: \chr(' . (\ord($char) & 0xFF) . ')');
351351
}
352352

353353
for ($pos = 0; $pos < 9; ++$pos) {

src/Type/Linear/MsiCheck.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ protected function setBars(): void
119119
for ($pos = 0; $pos < $clen; ++$pos) {
120120
$digit = $this->extcode[$pos];
121121
if (! isset($this::CHBAR[$digit])) {
122-
throw new BarcodeException('Invalid character: \chr(' . \ord($digit) . ')');
122+
throw new BarcodeException('Invalid character: \chr(' . (\ord($digit) & 0xFF) . ')');
123123
}
124124

125125
$seq .= $this::CHBAR[$digit];

src/Type/Linear/Postnet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ protected function setBars(): void
112112
for ($chr = 0; $chr < $clen; ++$chr) {
113113
$char = $this->extcode[$chr];
114114
if (! isset($this::CHBAR[$char])) {
115-
throw new BarcodeException('Invalid character: \chr(' . \ord($char) . ')');
115+
throw new BarcodeException('Invalid character: \chr(' . (\ord($char) & 0xFF) . ')');
116116
}
117117

118118
for ($pos = 0; $pos < 5; ++$pos) {

src/Type/Linear/RoyalMailFourCc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ protected function getChecksum(string $code): int
146146
for ($pos = 0; $pos < $len; ++$pos) {
147147
$char = $code[$pos];
148148
if (! isset($this::CHKSUM[$char])) {
149-
throw new BarcodeException('Invalid character: \chr(' . \ord($char) . ')');
149+
throw new BarcodeException('Invalid character: \chr(' . (\ord($char) & 0xFF) . ')');
150150
}
151151

152152
$row += (int) $this::CHKSUM[$char][0];

src/Type/Linear/StandardTwoOfFiveCheck.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ protected function setBars(): void
113113
for ($idx = 0; $idx < $clen; ++$idx) {
114114
$digit = $this->extcode[$idx];
115115
if (! isset($this::CHBAR[$digit])) {
116-
throw new BarcodeException('Invalid character: \chr(' . \ord($digit) . ')');
116+
throw new BarcodeException('Invalid character: \chr(' . (\ord($digit) & 0xFF) . ')');
117117
}
118118

119119
$seq .= $this::CHBAR[$digit];

src/Type/Square/QrCode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ protected function toUpper(string $data): string
247247
$pos += 2;
248248
} else {
249249
if ((\ord($data[$pos]) >= \ord('a')) && (\ord($data[$pos]) <= \ord('z'))) {
250-
$data[$pos] = \chr(\ord($data[$pos]) - 32);
250+
$data[$pos] = \chr((\ord($data[$pos]) - 32) & 0xFF);
251251
}
252252

253253
++$pos;

src/Type/Square/QrCode/Encoder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ protected function getCode(): int
130130
*/
131131
protected function setFrameAt(array $pos, int $val): void
132132
{
133-
$this->frame[$pos['y']][$pos['x']] = \chr($val);
133+
$this->frame[$pos['y']][$pos['x']] = \chr($val & 0xFF);
134134
}
135135

136136
/**

0 commit comments

Comments
 (0)