Browse Source

Merge pull request #13720 from cakephp/debug-int-modes-remove

Replace remaining integer debug levels references
ADmad 6 years ago
parent
commit
01bcbc0dbe

+ 1 - 1
src/Core/Configure/Engine/PhpConfig.php

@@ -30,7 +30,7 @@ use Cake\Core\Exception\Exception;
  * ```
  * <?php
  * return [
- *     'debug' => 0,
+ *     'debug' => false,
  *     'Security' => [
  *         'salt' => 'its-secret'
  *     ],

+ 1 - 1
src/Core/Exception/Exception.php

@@ -52,7 +52,7 @@ class Exception extends RuntimeException
      * Constructor.
      *
      * Allows you to create exceptions that are treated as framework errors and disabled
-     * when debug = 0.
+     * when debug mode is off.
      *
      * @param string|array $message Either the string of the error message, or an array of attributes
      *   that are made available in the view, and sprintf()'d into Exception::$_messageTemplate

+ 2 - 2
src/Error/BaseErrorHandler.php

@@ -114,8 +114,8 @@ abstract class BaseErrorHandler
      * Set as the default error handler by CakePHP.
      *
      * Use config/error.php to customize or replace this error handler.
-     * This function will use Debugger to display errors when debug > 0. And
-     * will log errors to Log, when debug == 0.
+     * This function will use Debugger to display errors when debug mode is on. And
+     * will log errors to Log, when debug mode is off.
      *
      * You can use the 'errorLevel' option to set what type of errors will be handled.
      * Stack traces for errors can be enabled with the 'trace' option.

+ 3 - 3
src/Error/ErrorHandler.php

@@ -23,12 +23,12 @@ use Throwable;
 
 /**
  * Error Handler provides basic error and exception handling for your application. It captures and
- * handles all unhandled exceptions and errors. Displays helpful framework errors when debug > 1.
+ * handles all unhandled exceptions and errors. Displays helpful framework errors when debug mode is on.
  *
  * ### Uncaught exceptions
  *
- * When debug < 1 a CakeException will render 404 or 500 errors. If an uncaught exception is thrown
- * and it is a type that ErrorHandler does not know about it will be treated as a 500 error.
+ * When debug mode is off a ExceptionRenderer will render 404 or 500 errors. If an uncaught exception is thrown
+ * and it is a type that ExceptionRenderer does not know about it will be treated as a 500 error.
  *
  * ### Implementing application specific exception handling
  *

+ 1 - 1
src/Error/ExceptionRenderer.php

@@ -35,7 +35,7 @@ use PDOException;
  * Exception Renderer.
  *
  * Captures and handles all unhandled exceptions. Displays helpful framework errors when debug is true.
- * When debug is false a CakeException will render 404 or 500 errors. If an uncaught exception is thrown
+ * When debug is false a ExceptionRenderer will render 404 or 500 errors. If an uncaught exception is thrown
  * and it is a type that ExceptionHandler does not know about it will be treated as a 500 error.
  *
  * ### Implementing application specific exception rendering