Skip to content

Wrong parameters for Foolz\SphinxQL\Exception\DatabaseException #191

@ghost

Description

Wrong parameters for Foolz\SphinxQL\Exception\DatabaseException([string $message [, long $code [, Throwable $previous = NULL]]]) {"exception":"[object] (Error(code: 0): Wrong parameters for Foolz\\SphinxQL\\Exception\\DatabaseException([string $message [, long $code [, Throwable $previous = NULL]]]) at /var/www/REMOVED/vendor/foolz/sphinxql-query-builder/src/Drivers/Pdo/Connection.php:28)

My code:

        try {
            return $query->execute()->fetchAllAssoc() ?? [];
        } catch (SphinxQLException $exception) {
            return [];
        } catch (DatabaseException $databaseException) {
            return [];
        }

The Exception is raised here:

class Connection extends ConnectionBase
{
    /**
     * @inheritdoc
     */
    public function query($query)
    {
        $this->ensureConnection();

        $statement = $this->connection->prepare($query);

        try {
            $statement->execute();
        } catch (PDOException $exception) {
            throw new DatabaseException($exception->getMessage() . ' [' . $query . ']', $exception->getCode(), $exception);
        }

        return new ResultSet(new ResultSetAdapter($statement));
    }

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