- Timestamp:
- 12/01/09 01:05:40 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.3/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineDqlTask.class.php
r24150 r24625 110 110 } 111 111 112 $headers[$field] = max($headers[$field], strlen($ value));112 $headers[$field] = max($headers[$field], strlen($this->renderValue($value))); 113 113 } 114 114 } … … 137 137 foreach ($result as $field => $value) 138 138 { 139 $line .= ' '.str_pad($ value, $headers[$field]).' |';139 $line .= ' '.str_pad($this->renderValue($value), $headers[$field]).' |'; 140 140 } 141 141 $this->log($line); … … 164 164 } 165 165 } 166 167 /** 168 * Renders the supplied value. 169 * 170 * @param string|null $value 171 * 172 * @return string 173 */ 174 protected function renderValue($value) 175 { 176 return null === $value ? 'NULL' : $value; 177 } 166 178 } branches/1.4/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineDqlTask.class.php
r24150 r24625 109 109 } 110 110 111 $headers[$field] = max($headers[$field], strlen($ value));111 $headers[$field] = max($headers[$field], strlen($this->renderValue($value))); 112 112 } 113 113 } … … 136 136 foreach ($result as $field => $value) 137 137 { 138 $line .= ' '.str_pad($ value, $headers[$field]).' |';138 $line .= ' '.str_pad($this->renderValue($value), $headers[$field]).' |'; 139 139 } 140 140 $this->log($line); … … 163 163 } 164 164 } 165 166 /** 167 * Renders the supplied value. 168 * 169 * @param string|null $value 170 * 171 * @return string 172 */ 173 protected function renderValue($value) 174 { 175 return null === $value ? 'NULL' : $value; 176 } 165 177 }