diff --git a/README.md b/README.md
index 52fbbd2ff..7876b4cd9 100644
--- a/README.md
+++ b/README.md
@@ -530,7 +530,6 @@ Want to add your own open-source project to this list? [Click here!](https://doc
* Get diffie-hellman configuration: getDhConfig
* Get discussion message from the associated discussion group of a channel to show it on top of the comment section, without actually joining the group: messages.getDiscussionMessage
* Get download info of file: getDownloadInfo
- * Get download info of the propic of a user: getPropicInfo
* Get download link of media file: getDownloadLink
* Get event handler (or plugin instance): getEventHandler
* Get extension from file location: getExtensionFromLocation
@@ -644,6 +643,7 @@ Want to add your own open-source project to this list? [Click here!](https://doc
* Gets a secret chat message: getSecretMessage
* Gets current notification settings for a given user/group, from all users/all groups: account.getNotifySettings
* Gets featured custom emoji stickersets: messages.getFeaturedEmojiStickers
+ * Gets info of the propic of a user: getPropicInfo
* Gets the current number of boosts of a channel: premium.getBoostsStatus
* Gets the default value of the Time-To-Live setting, applied to all new chats: messages.getDefaultHistoryTTL
* Gets the list of currently installed custom emoji stickersets: messages.getEmojiStickers
diff --git a/psalm-baseline.xml b/psalm-baseline.xml
index 3d06fc804..37e774ad4 100644
--- a/psalm-baseline.xml
+++ b/psalm-baseline.xml
@@ -119,6 +119,11 @@
+
+
+
+
+
@@ -3763,7 +3768,9 @@
+
+
methodCallAsyncRead('upload.getCdnFileHashes', ['file_token' => $file, 'offset' => $offset, 'cancellation' => $cancellation], $this->authorized_dc)]]>
methodCallAsyncRead('upload.reuploadCdnFile', ['file_token' => $messageMedia['file_token'], 'request_token' => $res['request_token'], 'cancellation' => $cancellation], $this->authorized_dc)]]>
@@ -3866,6 +3873,10 @@
+
+
+
+
@@ -3930,6 +3941,7 @@
+
@@ -3967,6 +3979,7 @@
+
@@ -3991,6 +4004,8 @@
+
+
cdn_hashes]]>
@@ -4061,7 +4076,6 @@
-
@@ -4467,6 +4481,7 @@
+
@@ -4475,7 +4490,6 @@
-
@@ -4524,6 +4538,8 @@
+
+
TL->getConstructors()->findByPredicate($constructor['_'])['type']]]>
authorization['user']['id']]]>
@@ -4564,6 +4580,7 @@
+
@@ -4639,9 +4656,6 @@
-
-
-
diff --git a/src/MTProtoTools/Files.php b/src/MTProtoTools/Files.php
index 3e506b23a..774dee0d1 100644
--- a/src/MTProtoTools/Files.php
+++ b/src/MTProtoTools/Files.php
@@ -712,7 +712,7 @@ trait Files
* @param mixed $messageMedia File ID
*
* @return array{
- * ext?: string,
+ * ext: string,
* name: string,
* mime: string,
* size: int,
@@ -731,6 +731,8 @@ trait Files
$pathinfo = pathinfo($messageMedia->fileName);
if (isset($pathinfo['extension'])) {
$res['ext'] = '.'.$pathinfo['extension'];
+ } else {
+ $res['ext'] = '';
}
$res['name'] = $pathinfo['filename'];
return $res;
@@ -757,6 +759,8 @@ trait Files
$pathinfo = pathinfo($messageMedia['file_name']);
if (isset($pathinfo['extension'])) {
$res['ext'] = '.'.$pathinfo['extension'];
+ } else {
+ $res['ext'] = '';
}
$res['name'] = $pathinfo['filename'];
return $res;
@@ -798,6 +802,8 @@ trait Files
$pathinfo = pathinfo($messageMedia['file_name']);
if (isset($pathinfo['extension'])) {
$res['ext'] = '.'.$pathinfo['extension'];
+ } else {
+ $res['ext'] = '';
}
$res['name'] = $pathinfo['filename'];
}
@@ -813,6 +819,8 @@ trait Files
$pathinfo = pathinfo($attribute['file_name']);
if (isset($pathinfo['extension'])) {
$res['ext'] = '.'.$pathinfo['extension'];
+ } else {
+ $res['ext'] = '';
}
$res['name'] = $pathinfo['filename'];
break;