Deprecated: ini_set(): Use of iconv.internal_encoding is deprecated in /www/doc/www.petho.cz/www/libs/Nette/Environment/Configurator.php on line 171

Deprecated: ini_set(): Use of mbstring.internal_encoding is deprecated in /www/doc/www.petho.cz/www/libs/Nette/Environment/Configurator.php on line 171
InvalidStateException

InvalidStateException

Cannot send header after HTTP headers have been sent (output started at /www/doc/www.petho.cz/www/libs/Nette/Environment/Configurator.php:171).

Source file

File: /www/doc/www.petho.cz/www/libs/Nette/Web/HttpResponse.php   Line: 99

Line  92:         * @param  string  header value
Line  93:         * @return NHttpResponse  provides a fluent interface
Line  94:         * @throws InvalidStateException  if HTTP headers have been sent
Line  95:         */
Line  96:        public function setHeader($name$value)
Line  97:        {
Line  98:            if (headers_sent($file$line)) {
Line  99:                throw new InvalidStateException("Cannot send header after HTTP headers have been sent" . ($file ? " (output started at $file:$line)." : "."));
Line 100:            }
Line 101:    
Line 102:            if ($value === NULL && function_exists('header_remove')) {
Line 103:                header_remove($name);
Line 104:            } else {
Line 105:                header($name ': ' $valueTRUE$this->code);
Line 106:            }

Call stack

  1. Application/Application.php (74) source   NHttpResponse-> setHeader (arguments )

  2. app/bootstrap.php (55) source   NApplication-> run ()

  3. www/index.php (13) source   require (arguments )

Nette Application

Environment

HTTP request

HTTP response