Skip to content

Commit

Permalink
Small bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Apr 7, 2024
1 parent 5f78b55 commit 78630d3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions src/Serialization.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,18 @@ public static function unserialize(SessionPaths $session, SettingsAbstract $sett
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;
Expand Down
2 changes: 1 addition & 1 deletion tools/phar.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private static function reportComposer(?string $local_release, ?string $remote_r
'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,
Expand Down

0 comments on commit 78630d3

Please sign in to comment.