Browse Source

Merge pull request #15074 from cakephp/bugfix/debug

Make sure debug as string doesn't throw error.
Mark Story 5 years ago
parent
commit
b7643bedec
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/Error/BaseErrorHandler.php
  2. 1 1
      src/View/Helper/FormHelper.php

+ 1 - 1
src/Error/BaseErrorHandler.php

@@ -166,7 +166,7 @@ abstract class BaseErrorHandler
             'line' => $line,
         ];
 
-        $debug = Configure::read('debug');
+        $debug = (bool)Configure::read('debug');
         if ($debug) {
             // By default trim 3 frames off for the public and protected methods
             // used by ErrorHandler instances.

+ 1 - 1
src/View/Helper/FormHelper.php

@@ -608,7 +608,7 @@ class FormHelper extends Helper
             $this->formProtector->addField($field, true, $value);
         }
 
-        $debugSecurity = Configure::read('debug');
+        $debugSecurity = (bool)Configure::read('debug');
         if (isset($secureAttributes['debugSecurity'])) {
             $debugSecurity = $debugSecurity && $secureAttributes['debugSecurity'];
             unset($secureAttributes['debugSecurity']);