Skip to content

compact with undefined variable breaks on PHP 7.3 #26936

@JacobBennett

Description

@JacobBennett
  • Laravel Version: 5.4
  • PHP Version: 7.3
  • Database Driver & Version:

MySQL

Description:

when trying to compact the operator variable which does not exits, php 7.3 will throw an ErrorException.

ErrorException
compact(): Undefined variable: operator

$this->wheres[] = compact('type', 'operator', 'query', 'boolean');

Steps To Reproduce:

Chain a has method onto the Query/Builder in php 7.3.

Similar to #25193

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