我正在使用来自roots.的Trellis,Bedrock和sage主题在WP上进行现代表演。一切正常,直到我激活鼠尾草主题(我从作曲家下载[见:github.com/roots/sage])。因此,当激活此主题时,它会给我一个错误:
Fatal error: Uncaught Error: Class 'Illuminate\Support\Collection' not found in /srv/www/example.com/current/web/app/themes/sage/vendor/illuminate/support/helpers.php on line 379
这是helpers.php的一部分
<?php
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
use Illuminate\Support\Collection;
use Illuminate\Support\Debug\Dumper;
use Illuminate\Contracts\Support\Htmlable;
use Illuminate\Support\HigherOrderTapProxy;
if (! function_exists('append_config')) {
/**
* Assign high numeric IDs to a config item to force appending.
*
* @param array $array
* @return array
*/
function append_config(array $array)
{
$start = 9999;
foreach ($array as $key => $value) {
if (is_numeric($key)) {
$start++;
$array[$start] = Arr::pull($array, $key);
}
}
return $array;
}
}
if (! function_exists('collect')) {
/**
* Create a collection from the given value.
*
* @param mixed $value
* @return \Illuminate\Support\Collection
*/
function collect($value = null)
{
return new Collection($value);
}
}
我没有修改任何东西,似乎我是唯一一个有这种错误的人,因为即使谷歌也无法帮助我:/为什么有一个&#34;未找到的课程& #34;什么时候显然有helpers.php?我该如何解决这个问题?