mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-10-28 05:58:40 -04:00
Fix PHP Warning: Cannot modify header information headers already sent (#9267)
Closes #9229 I restored my accidently deleted patches with @Inverle fixes. This fix is still works perfectly. Sorry. (https://github.com/FreshRSS/FreshRSS/pull/9230) How to test the feature manually: With this change: 1. Go to FreshRSS UserCSS extension config 2. Enable the UserCSS and set the CSS code in it. 3. Go to FreshRSS feeds page. 4. Hit the ctrl + F5 button and see no errors in the nginx log.
This commit is contained in:
1 parent
ce6e57ae0f
commit
99ee090236
2 files changed
+6
-1
No files matched your search
@@ -362,7 +362,8 @@ class FreshRSS_extension_Controller extends FreshRSS_ActionController {
|
||||
header("Content-Disposition: inline; filename='{$filename}'");
|
||||
header('Referrer-Policy: same-origin');
|
||||
if (file_exists(DATA_PATH . '/no-cache.txt') || !httpConditional($mtime, cacheSeconds: 604800, cachePrivacy: 2)) {
|
||||
echo $extension->getFile($filename);
|
||||
$contents = $extension->getFile($filename);
|
||||
$this->view->content = is_string($contents) ? $contents : '';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/** @var FreshRSS_View $this */
|
||||
echo $this->content;
|
||||
Reference in new issue
Block a user