Skip to content

Commit 1466f13

Browse files
Merge pull request #48 from CodeWithKyrian/47-calling-ffinew-statically-is-deprecated
fix: statically calling FFI::new deprecated in PHP 8.3
2 parents ecb8239 + 9aca78d commit 1466f13

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Tensor/TensorBuffer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ public function dump(): string
192192

193193
if ($byteSize === 0) return '';
194194

195-
$buf = FFI::new("char[$byteSize]");
195+
$buf = self::$ffi->new("char[$byteSize]");
196+
196197
FFI::memcpy($buf, $this->data, $byteSize);
197198

198199
return FFI::string($buf, $byteSize);

0 commit comments

Comments
 (0)