Not a bug error css after update to php 7.4

canina

Member
Affected version
2.0
I upgraded to php7.4 and suddenly there is a CSS error throughout the site
I looked at the network tab and I see that there are 2 reads to the css.php file

In the second reading it returns a valid css file but in the first reading it returns the content below

<?php

$dir = DIR;
require ($dir . '/src/XF.php');

XF::start($dir);
$app = XF::setupApp('XF\Pub\App', [
'preLoad' => ['masterStyleModifiedDate', 'smilieSprites']
]);

$request = $app->request();
$input = $request->filter([
'css' => 'str',
's' => 'uint',
'l' => 'uint',
'k' => 'str'
]);

$cssWriter = $app->cssWriter();

$showDebugOutput = (\XF::$debugMode && $request->get('_debug'));

if (!$showDebugOutput && $cssWriter->canSend304($request))
{
$cssWriter->get304Response()->send($request);
}
else
{
$css = $input['css'] ? explode(',', $input['css']) : [];
$response = $cssWriter->run($css, $input['s'], $input['l'], $input['k']);
if ($showDebugOutput)
{
$response->contentType('text/html', 'utf-8');
$response->body($app->debugger()->getDebugPageHtml($app));
}
$response->send($request);
}
 
XenForo 2.0 is not compatible with PHP 7.4 and XenForo 2.0 is no longer supported.

You will either need to downgrade PHP or upgrade XenForo to the latest 2.1 release.
 
Top Bottom