diff --git a/composer.json b/composer.json index d42eb7c3b..322b49120 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "ext-pthreads": "*" }, "require": { - "php-64bit": ">=8.2", + "php-64bit": ">=8.3", "danog/primemodule": "^1.0.13", "symfony/polyfill-mbstring": "*", "ext-json": "*", @@ -36,13 +36,13 @@ "amphp/amp": "^3.0.2", "amphp/http-client": "^5.1.0", "amphp/websocket-client": "^2", - "amphp/http": "^2.1.1", + "amphp/http": "^2.1.2", "amphp/socket": "^2.3.1", "amphp/dns": "^2.2.0", "amphp/byte-stream": "^2.1.1", "amphp/file": "^3.1.1", "amphp/mysql": "^3", - "amphp/postgres": "^2", + "amphp/postgres": "^2.1.1", "danog/dns-over-https": "^1", "amphp/http-client-cookies": "^2", "danog/tg-file-decoder": "^1.0.1", @@ -55,8 +55,8 @@ "psr/http-factory": "^1.1.0", "psr/log": "^3.0.2", "webmozart/assert": "^1.11", - "bacon/bacon-qr-code": "^3", - "nikic/php-parser": "^5.2.0", + "bacon/bacon-qr-code": "^3.0.1", + "nikic/php-parser": "^5.3.1", "revolt/event-loop": "^1.0.6", "danog/async-orm": "^1.1.0", "danog/telegram-entities": "^1.0.4", @@ -70,7 +70,7 @@ "phpunit/phpunit": "^9.6.21", "amphp/phpunit-util": "^3", "bamarni/composer-bin-plugin": "1.8.2", - "symfony/yaml": "^6.4.12", + "symfony/yaml": "^6.4.13", "revolt/event-loop-adapter-react": "^1.1.1", "dg/bypass-finals": "dev-master", "brianium/paratest": "^6.11.1", diff --git a/src/MTProtoTools/Files.php b/src/MTProtoTools/Files.php index 9d8603a3c..732cb735e 100644 --- a/src/MTProtoTools/Files.php +++ b/src/MTProtoTools/Files.php @@ -393,6 +393,9 @@ trait Files } await($promises, $cancellation); await($resPromises, $cancellation); + if ($totalSize === 0) { + throw new AssertionError('You uploaded an empty file!'); + } $time = microtime(true) - $start; $speed = (int) ($totalSize * 8 / $time) / 1000000; if (!$size) {