Roots/Sage-Design – PHP Schwerwiegender Fehler: Uncaught Error: Class ‘Illuminate\Support\Collection’ not found

Lesezeit: 1 Minute

Ich verwende das Trellis-, Bedrock- und Sage-Theme von roots.io für eine moderne Performance auf WP. Alles funktioniert gut, bis ich das Sage-Design aktiviere (das ich von composer [see: github.com/roots/sage]). Also, wenn dieses Thema aktiviert ist, gibt es mir einen Fehler:

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

Dies ist ein Teil von 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);
    }
}

Ich habe nichts geändert und es scheint, als wäre ich der einzige, der diese Art von Fehler hat, da selbst Google mir nicht helfen kann :/ Warum gibt es eine “nicht gefundene Klasse”, wenn es eindeutig in helpers.php vorhanden ist? Wie kann ich das beheben?

1428280cookie-checkRoots/Sage-Design – PHP Schwerwiegender Fehler: Uncaught Error: Class ‘Illuminate\Support\Collection’ not found

This website is using cookies to improve the user-friendliness. You agree by using the website further.

Privacy policy