'sqlite', 'filename' => DB_FILENAME, )); $db->getStatementHandler()->withLogging(); if ($db->schema('\Miniflux\Schema')->check(Miniflux\Schema\VERSION)) { return $db; } else { $errors = $db->getLogMessages(); $nb_errors = count($errors); $html = 'Unable to migrate the database schema, please copy and paste this message and create a bug report:
'; $html .= '
';
        $html .= (isset($errors[$nb_errors - 1]) ? $errors[$nb_errors - 1] : 'Unknown SQL error').PHP_EOL.PHP_EOL;
        $html .= '- PHP version: '.phpversion().PHP_EOL;
        $html .= '- SAPI: '.php_sapi_name().PHP_EOL;
        $html .= '- PDO Sqlite version: '.phpversion('pdo_sqlite').PHP_EOL;
        $html .= '- Sqlite version: '.$db->getDriver()->getDatabaseVersion().PHP_EOL;
        $html .= '- OS: '.php_uname();
        $html .= '
'; die($html); } });