1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-26 21:14:43 +01:00

Small bugfix

This commit is contained in:
Daniil Gentili 2024-04-07 18:24:43 +02:00
parent 43df573557
commit 561b4be55a
2 changed files with 8 additions and 5 deletions

View File

@ -223,15 +223,18 @@ abstract class Serialization
if ($settings instanceof Settings) {
$settings = $settings->getDb();
}
$prefix = null;
if ($unserialized instanceof DriverArray
|| $unserialized instanceof DbArrayBuilder
|| (!$exists && $settings instanceof DriverDatabaseAbstract)
|| (
!$exists
&& $settings instanceof DriverDatabaseAbstract
&& $prefix = $settings->getEphemeralFilesystemPrefix()
)
) {
$tableName = null;
$array = null;
if ($settings instanceof DriverDatabaseAbstract
&& $prefix = $settings->getEphemeralFilesystemPrefix()
) {
if ($prefix !== null) {
$tableName = "{$prefix}_MTProto_session";
} elseif ($unserialized instanceof DriverArray) {
$unserialized = (array) $unserialized;

View File

@ -140,7 +140,7 @@ class Installer
'Content-Type: application/json',
sprintf(
'User-Agent: Composer/%s (%s; %s; %s; %s%s)',
'MProto v7',
'MP v8',
\function_exists('php_uname') ? @php_uname('s') : 'Unknown',
\function_exists('php_uname') ? @php_uname('r') : 'Unknown',
$phpVersion,