You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every time, i want to make a new collection and when i add content i got this error.
I clear my cache with php please cache:clear and Light Speed Cache.
I rebuild and nothing work.
I delete Light Speed Cache from my composer and i got the same error.
The page work early, i juste make some modification and i got this error every time i want to make modification.
Thank you
foreach() argument must be of type array|object, null given
namespace Mgls\LitespeedCache\Http\Controllers;
use Closure;
use LSCache;
use Config;
use Illuminate\Support\Arr;
use Statamic\Support\Str;
class LiteSpeedLsCacheFrontEnd
{
public function handle($request, Closure $next)
{
/**
* Very simple middleware that set tag on page
*/
$response = $next($request);
$url = $request->path();
if($response->headers->has('X-LiteSpeed-Tag') == false) {
// Check if the page should be cachable
if($this->isCacheableRequest($url)){
// Route can be cache
$response->headers->set('X-LiteSpeed-Tag', "MG-Web");
}else{
// Roote cannot be cache because of forms
$response->headers->set('X-LiteSpeed-Tag', "MG-Web-No-Cache");
$response->headers->set('X-LiteSpeed-Cache-Control', 'no-cache');
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Every time, i want to make a new collection and when i add content i got this error.
I clear my cache with
php please cache:clear
and Light Speed Cache.I rebuild and nothing work.
I delete Light Speed Cache from my composer and i got the same error.
The page work early, i juste make some modification and i got this error every time i want to make modification.
Thank you
foreach() argument must be of type array|object, null given
Beta Was this translation helpful? Give feedback.
All reactions