Skip to content
Browse files

Merge pull request #290 from horsik/master

Fixed html_errors overwriting
  • Loading branch information...
2 parents 9c6b861 + 45fd042 commit f28a39065d455b6df1c989ea6590e971a1f0256d @guilhermeblanco guilhermeblanco committed Aug 17, 2013
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/Doctrine/Common/Util/Debug.php
View
8 lib/Doctrine/Common/Util/Debug.php
@@ -51,7 +51,11 @@ private function __construct()
*/
public static function dump($var, $maxDepth = 2, $stripTags = true)
{
- ini_set('html_errors', 'On');
+ $html = ini_get('html_errors');
+
+ if ($html !== true) {
+ ini_set('html_errors', true);
+ }
if (extension_loaded('xdebug')) {
ini_set('xdebug.var_display_max_depth', $maxDepth);
@@ -66,7 +70,7 @@ public static function dump($var, $maxDepth = 2, $stripTags = true)
echo ($stripTags ? strip_tags(html_entity_decode($dump)) : $dump);
- ini_set('html_errors', 'Off');
+ ini_set('html_errors', $html);
}
/**

0 comments on commit f28a390

Please sign in to comment.
Something went wrong with that request. Please try again.