Skip to content

Commit 56fb7c2

Browse files
committed
Fix "iconv(): Passing null to parameter #3 ($string) of type string is deprecated"
1 parent ce2818f commit 56fb7c2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/php/rdbms/tds/TdsProtocol.class.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ public function unmarshal($stream, $field, $records) {
118118
$len= $stream->getShort();
119119
if (0xFFFF === $len) {
120120
return null;
121+
} else if (0 === $len) {
122+
return '';
121123
} else if (\xp::ENCODING === $field['conv']) {
122124
return $stream->read($len);
123125
} else {

0 commit comments

Comments
 (0)