Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

fix Debug::getEscaper() never called at Debug::dump() when xdebug is loaded #5240

Closed
wants to merge 6 commits into from

Conversation

samsonasik
Copy link
Contributor

if we set Debug::setEscaper(new \Zend\Escaper\Escaper) before Debug::dump() and we have xdebug, the getEscaper() never called. added condition so getEscaper() will be called.

@@ -104,7 +104,7 @@ public static function dump($var, $label = null, $echo = true)
. PHP_EOL . $output
. PHP_EOL;
} else {
if (!extension_loaded('xdebug')) {
if (!extension_loaded('xdebug') || null !== static::$escaper) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks the lazy load of getEscaper

@samsonasik
Copy link
Contributor Author

@Maks3w done. please let me know if something I missed, thanks ;)

@samsonasik
Copy link
Contributor Author

@Maks3w I have updated this PR

},
"suggest": {
"ext/xdebug": "XDebug, for better backtrace output"
"ext/xdebug": "XDebug, for better backtrace output",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll change this to ext-xdebug on commit, as that's the proper format for extensions.

weierophinney added a commit that referenced this pull request Oct 23, 2013
fix Debug::getEscaper() never called at Debug::dump() when xdebug is loaded
weierophinney added a commit that referenced this pull request Oct 23, 2013
@ghost ghost assigned weierophinney Oct 23, 2013
weierophinney added a commit to zendframework/zend-debug that referenced this pull request May 15, 2015
…ix/escapercall

fix Debug::getEscaper() never called at Debug::dump() when xdebug is loaded
weierophinney added a commit to zendframework/zend-debug that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-debug that referenced this pull request May 15, 2015
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants