Changeset 6869
- Timestamp:
- 01/01/08 02:52:18 (1 year ago)
- Files:
-
- branches/1.1/lib/log/sfWebDebugLogger.class.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/lib/log/sfWebDebugLogger.class.php
r6592 r6869 4 4 * This file is part of the symfony package. 5 5 * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com> 6 * 6 * 7 7 * For the full copyright and license information, please view the LICENSE 8 8 * file that was distributed with this source code. … … 35 35 public function initialize(sfEventDispatcher $dispatcher, $options = array()) 36 36 { 37 $this->webDebug = new sfWebDebug();38 37 $this->context = sfContext::getInstance(); 39 38 $this->dispatcher = $dispatcher; 40 39 41 40 $dispatcher->connect('response.filter_content', array($this, 'filterResponseContent')); 41 42 if(is_null($this->webDebug)) 43 { 44 $this->webDebug = $this->context->has('sf_web_debug') ? $this->context->get('sf_web_debug') : new sfWebDebug(); 45 } 46 47 $this->context->set('sf_web_debug', $this->webDebug); 42 48 43 49 if (isset($options['xdebug_logging'])) … … 90 96 91 97 // add needed assets for the web debug toolbar 92 $root = $this->context->getRequest()->getRelativeUrlRoot(); 98 $root = $this->context->getRequest()->getRelativeUrlRoot(); 93 99 $assets = sprintf(' 94 100 <script type="text/javascript" src="%s"></script> … … 121 127 // if we have xdebug and dev has not disabled the feature, add some stack information 122 128 $debugStack = array(); 123 if ( function_exists('xdebug_get_function_stack') && $this->xdebugLogging)129 if ($this->xdebugLogging && function_exists('xdebug_get_function_stack')) 124 130 { 125 131 foreach (xdebug_get_function_stack() as $i => $stack)