From 019669438cb98831af07bcf51b98edc10b3a36e8 Mon Sep 17 00:00:00 2001 From: Jonas Date: Sun, 27 Mar 2016 17:24:10 +0200 Subject: [PATCH 1/2] educate about 'chaining' debug() #3861 https://github.com/cakephp/docs/pull/3861 --- en/development/debugging.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/en/development/debugging.rst b/en/development/debugging.rst index c96699cd9a..fff05e53e4 100644 --- a/en/development/debugging.rst +++ b/en/development/debugging.rst @@ -24,6 +24,15 @@ default. Output from this function is only shown if the core ``$debug`` variable has been set to ``true``. +.. versionadded:: 3.3.0 + + Calling this method will return passed ``$var``, so that you can, for instance, + place it in return statements, for example:: + + return debug($data); // will return $data in any case. + +Also see ``pr()`` and ``pj()``. + .. php:function:: stackTrace() The ``stackTrace()`` function is available globally, and allows you to output From b233fad94b6cc886e0c83d14d7bf8b18f8ba80e6 Mon Sep 17 00:00:00 2001 From: Jonas Date: Tue, 29 Mar 2016 23:12:36 +0200 Subject: [PATCH 2/2] WARNING: Literal block expected; none found. hopefully fixes WARNING: Literal block expected; none found. --- en/development/debugging.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/development/debugging.rst b/en/development/debugging.rst index fff05e53e4..a0397a0f6a 100644 --- a/en/development/debugging.rst +++ b/en/development/debugging.rst @@ -29,7 +29,7 @@ has been set to ``true``. Calling this method will return passed ``$var``, so that you can, for instance, place it in return statements, for example:: - return debug($data); // will return $data in any case. + return debug($data); // will return $data in any case. Also see ``pr()`` and ``pj()``.