I'm running into an issue where a lot of Warning spam is being created by the setDatafromModuleAcf and setDataFromFilter methods when the data returned by $this->classAcf->getData() is not an array, e.g.:
[23-Oct-2018 19:52:07 UTC] PHP Warning: array_merge(): Argument #2 is not an array in /vendor/soberwp/controller/src/Controller.php on line 151
[23-Oct-2018 19:52:07 UTC] PHP Warning: array_merge(): Argument #1 is not an array in /vendor/soberwp/controller/src/Controller.php on line 163
I'm running PHP 7.1.12 - not sure if that is why I'm seeing all these warnings.
I was able to resolve by wrapping the data set in __setDatafromModuleAcf with a check for an array, but wasn't sure if that was ideal, e.g.:
// Merge the data from Acf module
// $this->data = array_merge($this->classAcf->getData(), $this->data);
if (is_array($this->classAcf->getData())) {
$this->data = array_merge($this->data, $this->classAcf->getData());
}
Hello -
I'm running into an issue where a lot of Warning spam is being created by the setDatafromModuleAcf and setDataFromFilter methods when the data returned by $this->classAcf->getData() is not an array, e.g.:
I'm running PHP 7.1.12 - not sure if that is why I'm seeing all these warnings.
I was able to resolve by wrapping the data set in __setDatafromModuleAcf with a check for an array, but wasn't sure if that was ideal, e.g.:
Let me know if I can provide more information!