diff --git a/src/Serialization.php b/src/Serialization.php index 2de4d62b7..8a434e88f 100644 --- a/src/Serialization.php +++ b/src/Serialization.php @@ -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; diff --git a/tools/phar.php b/tools/phar.php index 20071230b..b0cacc29a 100644 --- a/tools/phar.php +++ b/tools/phar.php @@ -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,