Commit c234310d851aea8a6d916592974ee10b3f2eba55
1 parent
f7cbf861
On the off-chance the $GLOBALS['main'] variable isn't set yet, set it to
a new KTPage object. git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5171 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
6 additions
and
0 deletions
lib/dispatcher.inc.php
| @@ -175,6 +175,9 @@ class KTStandardDispatcher extends KTDispatcher { | @@ -175,6 +175,9 @@ class KTStandardDispatcher extends KTDispatcher { | ||
| 175 | var $sHelpPage = null; | 175 | var $sHelpPage = null; |
| 176 | 176 | ||
| 177 | function KTStandardDispatcher() { | 177 | function KTStandardDispatcher() { |
| 178 | + if (empty($GLOBALS['main'])) { | ||
| 179 | + $GLOBALS['main'] =& new KTPage; | ||
| 180 | + } | ||
| 178 | $this->oPage =& $GLOBALS['main']; | 181 | $this->oPage =& $GLOBALS['main']; |
| 179 | parent::KTDispatcher(); | 182 | parent::KTDispatcher(); |
| 180 | } | 183 | } |
| @@ -320,6 +323,9 @@ class KTErrorDispatcher extends KTStandardDispatcher { | @@ -320,6 +323,9 @@ class KTErrorDispatcher extends KTStandardDispatcher { | ||
| 320 | function dispatch() { | 323 | function dispatch() { |
| 321 | require_once(KT_LIB_DIR . '/validation/errorviewer.inc.php'); | 324 | require_once(KT_LIB_DIR . '/validation/errorviewer.inc.php'); |
| 322 | $oRegistry =& KTErrorViewerRegistry::getSingleton(); | 325 | $oRegistry =& KTErrorViewerRegistry::getSingleton(); |
| 326 | + print "<pre>"; | ||
| 327 | + var_dump($this->oError); | ||
| 328 | + exit(0); | ||
| 323 | $oViewer =& $oRegistry->getViewer($this->oError); | 329 | $oViewer =& $oRegistry->getViewer($this->oError); |
| 324 | $this->oPage->setTitle($oViewer->view()); | 330 | $this->oPage->setTitle($oViewer->view()); |
| 325 | $this->oPage->hideSection(); | 331 | $this->oPage->hideSection(); |