Skip to content

Return value of CodeIgniter\Database\BaseConnection::getConnectStart() must be of the type float, null returned #2158

Description

@Martin-4Spaces

This error occurs if I connect to a database group but never use it.

Ex.

$routes->get('issue', function() {
    $db = Database::connect('default');
    echo 'Nah, I dont need the connection anyway';
});

TypeError

connectTime in BaseConnection is set when the first query is run. But Database::formatTimelineData will always call getConnectStart.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions