no-framework-tutorial icon indicating copy to clipboard operation
no-framework-tutorial copied to clipboard

router example throws exception

Open hesna opened this issue 6 years ago • 2 comments

Running current code for Router section results in following error: Cannot modify header information - headers already sent

It is caused by echo statements in route resolvers and can be fixed if resolvers return content instead.

As it is, one cannot finish this section without an exception page. Is this behavior intentional?

hesna avatar Oct 14 '18 20:10 hesna

I wonder if this is what he meant to say but never did.

"Comment out this code until next step"

foreach ($response->getHeaders() as $header) {
    header($header, false);
}
echo $response->getContent();

tylerlazenby avatar Feb 14 '20 18:02 tylerlazenby

I'm confused and lost between step 5 and 6. What am I supposed to see after implementing all code from step5? The 404 page message still? Because that's what I get..... I doubt it's supposed to be like this.

Wondarar avatar Nov 14 '21 09:11 Wondarar