Skip to content

Attempted to call an undefined method named "getMessageParameters" of class "Doctrine\DBAL\Exception\DriverException". #1031

Open
@mrfroasty

Description

@mrfroasty

Summary
When running importexport and some exception get thrown e.g Doctrine\DBAL\Exception\UniqueConstraintViolationException, class Oro\Bundle\BatchBundle\Step\StepExecutor::handleStepExecutionWarning() will attempt to call getMessageParameters().

Steps to reproduce
Mimic any doctrine exceptions that do not implement method getMessageParameters.

Actual Result
Calling methods (getMessageParameters) that do not exist.

Expected Result
Should call method getMessageParameters only if exist

Details about your environment

  • OroPlatform version: 4.1.1
  • PHP version: 7.3.18
  • Database (PostgreSQL) version: 9.6

Additional information
I am not so sure but I think Oro\Bundle\BatchBundle\Step\StepExecutor::handleStepExecutionWarning should check existence of getMessageParameters or only call this on expected class. e.g fixes #982

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions