Skip to content

Commit

Permalink
fix Error and Debug when called from a page
Browse files Browse the repository at this point in the history
  • Loading branch information
soif committed Dec 11, 2013
1 parent 84b8772 commit f94590f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions www/inc/lib/pmd_kernel.php
Expand Up @@ -94,8 +94,10 @@ function PageError($code='404', $txt="Not Found"){
$p['err_code'] =$code;
$p['err_txt'] =$txt;
$this->conf['app']['page']='error';
$page= new PMD_Root_Page($this);
$page->Display($p);
if(!is_object($this->o_page)){
$this->o_page= new PMD_Root_Page($this);
}
$this->o_page->Display($p);
}

//----------------------------------------------------------------------------------
Expand All @@ -106,8 +108,10 @@ function PageDebug($txt='', $arr="", $exit=1){
$p['content_backtrace'] =$this->_GetBacktraceAll();
$p['content_arr'] =print_r($arr,true);
$this->conf['app']['page']='debug';
$page= new PMD_Root_Page($this);
$page->Display($p);
if(!is_object($this->o_page)){
$this->o_page= new PMD_Root_Page($this);
}
$this->o_page->Display($p);
exit;
}
else{
Expand Down

0 comments on commit f94590f

Please sign in to comment.