GearboxSolutionsEloquentFileMakerServicesFileMakerConnection::setGlobalFields(): Argument #1 ($globalFields) must be of type array, GearboxSolutionsEloquentFileMaker\Database\Query\FMBaseBuilder given
Line #861 in FMBaseBuilder.php seems to be the problem:
#857: public function setGlobalFields(array $globals)#858: {#859: $this->globalFields = $globals;#860:#861: return $this->connection->setGlobalFields($this);#862: }
Replace the $this passed as an argument with $globals. That fixes the issue.
Dependencies
Description of the issue:
Firstly, may I suggest giving an example in the documentation of how to use the setGlobalFields() function. This function is not documented.
Back to the issue. When this function is called, for example :
FM::layout('web_inventory')->setGlobalFields(["inventory::price_category" => 123])
The following exception is thrown:
Line #861 in FMBaseBuilder.php seems to be the problem:
#857: public function setGlobalFields(array $globals)
#858: {
#859: $this->globalFields = $globals;
#860:
#861: return $this->connection->setGlobalFields($this);
#862: }
Replace the $this passed as an argument with $globals. That fixes the issue.