Commit c18ca58aaa4f24bd1b188ba9ed7d7742140936ce
1 parent
ec8d6ece
KTS-3612
"Call to a member function on a non-object:" Fixed. Error was caused by the custom validation page logging a db error before logging is initialised. Removed part of custom error handler. Committed by: Megan Watson Reviewed by: Conrad Vermeulen git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@9147 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
9 additions
and
17 deletions
config/dmsDefaults.php
| ... | ... | @@ -289,6 +289,8 @@ class KTInit { |
| 289 | 289 | function handleInitError($oError) { |
| 290 | 290 | global $checkup; |
| 291 | 291 | if ($checkup === true) { |
| 292 | + echo $oError->toString(); | |
| 293 | + exit(0); | |
| 292 | 294 | //return; |
| 293 | 295 | } |
| 294 | 296 | |
| ... | ... | @@ -358,25 +360,15 @@ class KTInit { |
| 358 | 360 | |
| 359 | 361 | function catchFatalErrors() |
| 360 | 362 | { |
| 363 | + ini_set('display_errors','On'); | |
| 364 | + $phperror='><div id="phperror" style="display:none">'; | |
| 365 | + ini_set('error_prepend_string',$phperror); | |
| 361 | 366 | |
| 362 | - $CustomErrorPage = KTCustomErrorViewer::getCustomErrorRedirectPage(); | |
| 363 | - if($CustomErrorPage != '0') | |
| 364 | - { | |
| 365 | - ini_set('display_errors','On'); | |
| 366 | - $phperror='><div id="phperror" style="display:none">'; | |
| 367 | - ini_set('error_prepend_string',$phperror); | |
| 368 | - | |
| 369 | - $sUrl = KTInit::guessRootUrl(); | |
| 370 | - global $default; | |
| 371 | - $sRootUrl = ($default->sslEnabled ? 'https' : 'http') .'://'.$_SERVER['HTTP_HOST'].$sUrl; | |
| 372 | - | |
| 373 | - $CustomErrorPage = basename($CustomErrorPage); | |
| 374 | - | |
| 375 | - $phperror='</div>><form name="catcher" action="'.$sRootUrl.'/'.$CustomErrorPage.'" method="post" ><input type="hidden" name="fatal" value=""></form> | |
| 376 | - <script> document.catcher.fatal.value = document.getElementById("phperror").innerHTML; document.catcher.submit();</script>'; | |
| 377 | - ini_set('error_append_string',$phperror); | |
| 378 | - } | |
| 367 | + $CustomErrorPage = KTUtil::kt_url().'/customerrorpage.php'; | |
| 379 | 368 | |
| 369 | + $phperror='</div>><form name="catcher" action="'.$CustomErrorPage.'" method="post" ><input type="hidden" name="fatal" value=""></form> | |
| 370 | + <script> document.catcher.fatal.value = document.getElementById("phperror").innerHTML; document.catcher.submit();</script>'; | |
| 371 | + ini_set('error_append_string',$phperror); | |
| 380 | 372 | } |
| 381 | 373 | |
| 382 | 374 | ... | ... |