2619 :: /articles/ PHP warning

PHP warning

Cannot modify header information - headers already sent by (output started at /home/proshareng/public_html/protected/controllers/SiteController.php:935)

/home/proshareng/public_html/yii-1.1.13.e9e4a0/framework/web/CHttpRequest.php(789)

777     /**
778      * Redirects the browser to the specified URL.
779      * @param string $url URL to be redirected to. Note that when URL is not
780      * absolute (not starting with "/") it will be relative to current request URL.
781      * @param boolean $terminate whether to terminate the current application
782      * @param integer $statusCode the HTTP status code. Defaults to 302. See {@link http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html}
783      * for details about HTTP status code.
784      */
785     public function redirect($url,$terminate=true,$statusCode=302)
786     {
787         if(strpos($url,'/')===0 && strpos($url,'//')!==0)
788             $url=$this->getHostInfo().$url;
789         header('Location: '.$url, true, $statusCode);
790         if($terminate)
791             Yii::app()->end();
792     }
793 
794     /**
795      * Returns an array of user accepted languages in order of preference.
796      * The returned language IDs will NOT be canonicalized using {@link CLocale::getCanonicalID}.
797      * @return array the user accepted languages in the order of preference.
798      * See {@link http://tools.ietf.org/html/rfc2616#section-14.4}
799      */
800     public function getPreferredLanguages()
801     {

Stack Trace

#2
+
 /home/proshareng/public_html/protected/controllers/SiteController.php(946): CController->redirect("/articles/The-Economy/What-causes-a-currency-crisis/2619")
941                     foreach($posts as $row) {
942                         $url .= $this->getTrimmedArticlesTitle($row["article_category_name"])."/".$this->getTrimmedArticlesTitle($row["article_title"])."/".$articlesid;
943                     }
944                 }
945             }
946             $this->redirect($url);
947         }
948         else {
949             $model->articlescat = $articlescat;
950             $model->articlestitle = $articlestitle;
951         }
#12
+
 /home/proshareng/public_html/index.php(13): CApplication->run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11 
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
2020-03-29 21:07:53 Apache Yii Framework/1.1.13