pmmp / Math

PHP library containing math related code used in PocketMine-MP
GNU Lesser General Public License v3.0
41 stars 20 forks source link

Fatal error in Matrix class with PHP 8.1 #76

Closed Nerahikada closed 2 years ago

Nerahikada commented 2 years ago
Fatal error: During inheritance of ArrayAccess: Uncaught ErrorException: Return type of pocketmine\math\Matrix::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///home/pmmp/crash/PocketMine-MP.phar/vendor/pocketmine/math/src/Matrix.php:43

PocketMine-MP version: 4.7.3 [Protocol 544] Git commit: pmmp/PocketMine-MP@b5a049d1fe40cb1be44d7876564994e87cb76bd1 PHP version: 8.1.9 OS: Linux, linux

Composer libraries:

dktapps commented 2 years ago

If you want, you could submit a PR to add the ReturnTypeWillChange attribute.