MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000457XdebugFeature/Change requestpublic2009-07-27 17:072011-11-11 23:50
Reportergiorgiosironi 
Assigned Toderick 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version2.0.0dev 
Target VersionFixed in Version 
Summary0000457: var_dump() overloading from the command line
DescriptionWhen html_errors is not set in php.ini, the var_dump() overloading is not used. If set to On, an html dump is shown but it is inappropriate for usage from the command line. The overloading should be used without showing a html when html_errors is Off, resulting in a plain text dump.
Additional InformationWorkaround:
#
 public function dump($var)
#
    {
#
        ini_set('html_errors', 'On');
#
        ob_start();
#
        var_dump($var);
#
        $dump = ob_get_contents();
#
        ob_end_clean();
#
        echo strip_tags(html_entity_decode($dump));
#
    }
#
 
#
[16:54:23][giorgio@Marty:~/svn/doctrine2/tests]$ phpunit Doctrine/Tests/ORM/Functional/DetachedEntityTest.php
#
PHPUnit 3.3.17 by Sebastian Bergmann.
#
object(Doctrine\ORM\PersistentCollection)[180]
#
  private '_type' => null
#
  private '_snapshot' =>
#
    array
#
      empty
#
  private '_owner' => null
#
  private '_association' => null
#
  private '_keyField' => null
#
  private '_em' => null
#
  private '_backRefFieldName' => null
#
  private '_typeClass' => null
#
  private '_isDirty' => boolean true
#
  protected '_initialized' => boolean true
#
  protected '_elements' =>
#
    array
#
      0 =>
#
        object(Doctrine\Tests\Models\CMS\CmsPhonenumber)[181]
#
          ...
#
      1 =>
#
        object(Doctrine\Tests\Models\CMS\CmsPhonenumber)[182]
#
          ...
TagsNo tags attached.
Operating SystemUbuntu Linux 9.04
PHP Version5.3.0
Attached Files

- Relationships
has duplicate 0000706resolvedderick var_dump not overloaded in CLI when html_errors is off 

-  Notes
(0001857)
derick (administrator)
2011-11-11 23:50

Implemented on github for 2.2dev.

- Issue History
Date Modified Username Field Change
2009-07-27 17:07 giorgiosironi New Issue
2009-07-27 17:07 giorgiosironi Operating System => Ubuntu Linux 9.04
2009-07-27 17:07 giorgiosironi PHP Version => 5.3.0
2009-07-27 17:07 giorgiosironi Xdebug Version => 2.0.5
2011-11-11 23:50 derick Note Added: 0001857
2011-11-11 23:50 derick Status new => closed
2011-11-11 23:50 derick Assigned To => derick
2011-11-11 23:50 derick Resolution open => fixed
2014-02-27 19:11 derick Relationship added has duplicate 0000706


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker