Silverstripe Version: 4.8.0
Question:
Hello when i try to enable FulltextSearchable according to documentation i got error
Uncaught TypeError: Argument 1 passed to SilverStripe\Config\MergeStrategy\Priority::mergeArray() must be of the type array, string given, called in /var/webpage/cms/vendor/silverstripe/framework/src/Core/Config/Middleware/InheritanceMiddleware.php on line 43
my _config.php
use SilverStripe\ORM\Search\FulltextSearchable;
FulltextSearchable::enable();
How can i deal with it?
public function getClassConfig($class, $excludeMiddleware, $next)
{
// Skip if disabled
var_dump($class);
$config = $next($class, $excludeMiddleware);
if (!$this->enabled($excludeMiddleware)) {
return $config;
}
// Skip if not a class or not parent class
$parent = class_exists($class) ? get_parent_class($class) : null;
if (!$parent) {
return $config;
}
// Merge with parent class
$parentConfig = Config::inst()->get($parent, null, $excludeMiddleware);
return Priority::mergeArray($config, $parentConfig);
}
I checked that class passed to this function is
SilverStripe\ORM\Search\FulltextSearchable
But $config is empty for this class how can i solve this problem?