From 5c1e51d8a5331f559c12a396258feea039097629 Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Mon, 9 Nov 2015 11:33:44 -0500
Subject: [PATCH] Fix dynamic debug / console mode problem.

---
 module/VuFind/src/VuFind/Bootstrapper.php | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/module/VuFind/src/VuFind/Bootstrapper.php b/module/VuFind/src/VuFind/Bootstrapper.php
index f8722c436f1..a6ea0ffae8e 100644
--- a/module/VuFind/src/VuFind/Bootstrapper.php
+++ b/module/VuFind/src/VuFind/Bootstrapper.php
@@ -147,12 +147,17 @@ class Bootstrapper
     }
 
     /**
-     * Initialize dynamic debug mode.
+     * Initialize dynamic debug mode (debug initiated by a ?debug=true parameter).
      *
      * @return void
      */
     protected function initDynamicDebug()
     {
+        // Query parameters do not apply in console mode:
+        if (Console::isConsole()) {
+            return;
+        }
+
         $app = $this->event->getApplication();
         $sm = $app->getServiceManager();
         $debugOverride = $sm->get('Request')->getQuery()->get('debug');
-- 
GitLab