#5936: debug() missinterprets second parameter $showHtml
----------------------------------------------------------------+-----------
Reporter: ionas82 |
Type: Bug
Status: new |
Priority: Medium
Milestone: 1.2.x.x |
Component: Error Handling
Version: 1.2 Final |
Severity: Normal
Keywords: debug, error, logging, debugging, inconsistency |
Php_version: n/a
Cake_version: 1.2.0.7962 |
----------------------------------------------------------------+-----------
In the function's description it says:
@param boolean $showHtml If set to true, the method prints the debug data
in a screen-friendly way.
What it actually does is showing the Html by converting < and > to html
entities - which is... useless? What it should better do is what it
promises in the DocBlock description. If set to true it should print the
debug information in html, if not it should print it as raw text.
$showHtml should be set to true then by default.
pr($string) does not work because it wraps in <pre> as well (wich will
mess raw text log files with html too). pr() besides has $showFrom in its
DocBlock/function description above the function, but does not use any
second parameter.
Why this change?
ob_start();
debug($string, false);
$debug = ob_get_contents();
ob_end_clean();
someLoggingMethod($debug);
--
Ticket URL: <https://trac.cakephp.org/ticket/5936>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC.
Our primary goal is to provide a structured framework that enables PHP users at
all levels to rapidly develop robust web applications, without any loss to
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"tickets cakephp" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---