Browse files

Add better warning if text is outputed during init()

  • Loading branch information...
1 parent 6635ce4 commit 4de687509ccdee8bb48e8c2d108bdb32c5a7d111 @romaninsh romaninsh committed May 20, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/ApiWeb.php
View
4 lib/ApiWeb.php
@@ -196,6 +196,10 @@ function render(){
}
$this->hook('pre-render-output');
+ if(headers_sent($file,$line)){
+ echo "<br/>Direct output (echo or print) ditected on $file:$line. <a target='_blank' "
+ ."href='http://agiletoolkit.org/error/direct_output'>Use \$this->add('Text') instead</a>.<br/>";
+ }
echo $this->template->render();
$this->hook('post-render-output');
}

0 comments on commit 4de6875

Please sign in to comment.