diff --git a/html/preload/debugOnlyAdmin.class.php b/html/preload/debugOnlyAdmin.class.php
index ef1be8976..8a746cb26 100644
--- a/html/preload/debugOnlyAdmin.class.php
+++ b/html/preload/debugOnlyAdmin.class.php
@@ -6,7 +6,7 @@
class debugOnlyAdmin extends XCube_ActionFilter
{
public function postFilter() {
- if ($GLOBALS['xoopsErrorHandler'] && is_object($GLOBALS['xoopsErrorHandler'])) {
+ if (!empty($GLOBALS['xoopsErrorHandler']) && is_object($GLOBALS['xoopsErrorHandler'])) {
$root = XCube_Root::getSingleton();
if (! $root->mContext->mUser->isInRole('Site.Administrator')) {
$GLOBALS['xoopsErrorHandler']->activate(false);