-
-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
F::load()
: guard from output
#4656
Conversation
@lukasbestle not sure if this test is actually working or I am testing it wrong. A unit test like this does not fail (while it probably should): /**
* @covers ::load
*/
public function testLoadWithInvalidOutput()
{
F::load(__DIR__ . '/fixtures/f/load/FileWithOutput.php');
} With a file // empty line
// empty line
<?php
return []; |
I think |
Hmm I see. |
Co-authored-by: Lukas Bestle <lukas@getkirby.com>
3150414
to
894cc91
Compare
@distantnative it does seem to work for the problem i eccountered |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have found a way to test this on the CLI by mocking the headers_sent()
function. It even showed a minor bug that I missed during visual review.
@distantnative Could you take a final look at the changes and tests?
Looks good to me! |
This PR …
Enhancement
F::load()
andF::loadOnce()
: guarded from unintended outputCorrupted media on first serve because of stray whitespace #4391
Ready?
Unit tests for fixed bug/featureFor review team
Add to website docs release checklist (if needed)