Fixed inconsistent debug parameters and empty '(line )' #297

Merged
merged 3 commits into from Nov 17, 2011

Conversation

Projects
None yet
3 participants
@markomarkovic
Contributor

markomarkovic commented Nov 4, 2011

  • When $showFrom is false, not outputting empty (line ) in the debug messages.
  • If it's passed, $useHtml is obeyed regardless of the API used.
    • if $useHtml == true — HTML template is used.
    • if $useHtml == false — TEXT template is used.
    • default (null) — autodetect.
@lorenzo

This comment has been minimized.

Show comment Hide comment
@lorenzo

lorenzo Nov 4, 2011

Owner

Do you think you could update the test cases too?

Owner

lorenzo commented Nov 4, 2011

Do you think you could update the test cases too?

@markstory

This comment has been minimized.

Show comment Hide comment
@markstory

markstory Nov 5, 2011

Owner

Won't the tests with HTML in them will fail on command line? The output of debug() is different depending on the sapi name.

Owner

markstory commented Nov 5, 2011

Won't the tests with HTML in them will fail on command line? The output of debug() is different depending on the sapi name.

Updated test for debug
It now detects being called from CLI
@markstory

This comment has been minimized.

Show comment Hide comment
@markstory

markstory Nov 16, 2011

Owner

This change has an interesting behaviour change, in that debug($foo, false) will output the CLI version of debug() in a web request. Is that a desired change?

Owner

markstory commented Nov 16, 2011

This change has an interesting behaviour change, in that debug($foo, false) will output the CLI version of debug() in a web request. Is that a desired change?

@markomarkovic

This comment has been minimized.

Show comment Hide comment
@markomarkovic

markomarkovic Nov 16, 2011

Contributor

Yes, it is. I assume that if you do set the parameter, you'll expect the behavior to be consistent so if it's set, it overrides the auto-detection of API.

Contributor

markomarkovic commented Nov 16, 2011

Yes, it is. I assume that if you do set the parameter, you'll expect the behavior to be consistent so if it's set, it overrides the auto-detection of API.

@markstory

This comment has been minimized.

Show comment Hide comment
@markstory

markstory Nov 16, 2011

Owner

Ok, I think thats a reasonable change the old behavior was a bit stupid.

Owner

markstory commented Nov 16, 2011

Ok, I think thats a reasonable change the old behavior was a bit stupid.

markstory added a commit that referenced this pull request Nov 17, 2011

Merge pull request #297 from markomarkovic/73429b357f06cd76f35d81482d…
…d789b1737fe2b9

Fixed inconsistent debug parameters and empty '(line )'

@markstory markstory merged commit 2c5350b into cakephp:2.0 Nov 17, 2011

@markomarkovic markomarkovic deleted the markomarkovic:73429b357f06cd76f35d81482dd789b1737fe2b9 branch Nov 13, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment