A pet peeve of mine is that whenever the Debugger class prints an
error or Warning message, I have to reach for my mouse and scroll
across the page to see the entire message.  Debugger outputs the
message with the tag <pre class="cake-debug"> so I tried to put the
following rule in my CSS stylesheet:

pre.cake-debug {
  white-space: pre-wrap;
}

However, this has no effect, as the HTML header that links to the
stylesheet is never output so the stylesheet is never loaded when an
error occurs.

So in order to get my desired result, I had to break form and modify
core debugger.php as follows:


    $e = '<style type="text/css">pre.cake-debug { white-space: pre-
wrap }</style>';
    $e .= '<pre class="cake-debug">';

Instead of

    $e = '<pre class="cake-debug">';

Is there a safer, and more elegant, way to accomplish this?

I suppose I could subclass Debugger and set it instead of Debugger as
the PHP error handler but there's a lot of code in that constructor
that I would have to override and it could still break on a subsequent
release of CakePHP.

I hope that in the next release somebody will address this.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to