svn: /pear/pear-core/trunk/PEAR/ Exception.php
| From: | Helgi Þormar Þorbjörnsson | Date: | Sat, 27 Mar 2010 16:24:43 +0000 |
| Subject: | svn: /pear/pear-core/trunk/PEAR/ Exception.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-9337@lists.php.net to get a copy of this message | ||
dufuz Sat, 27 Mar 2010 16:24:43 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=296939
Log:
Bug #16767 Use of Depreciated HTML Attributes in the Exception class [patch by fuhrysteve (Stephen
J. Fuhry)]
Bug: http://pear.php.net/bugs/16767 (unknown)
Changed paths:
U pear/pear-core/trunk/PEAR/Exception.php
Modified: pear/pear-core/trunk/PEAR/Exception.php
===================================================================
--- pear/pear-core/trunk/PEAR/Exception.php 2010-03-27 16:16:25 UTC (rev 296938)
+++ pear/pear-core/trunk/PEAR/Exception.php 2010-03-27 16:24:43 UTC (rev 296939)
@@ -289,7 +289,7 @@
}
public function getTraceSafe()
- {
+ {
if (!isset($this->_trace)) {
$this->_trace = $this->getTrace();
if (empty($this->_trace)) {
@@ -325,21 +325,21 @@
$trace = $this->getTraceSafe();
$causes = array();
$this->getCauseMessage($causes);
- $html = '<table border="1" cellspacing="0">' .
"\n";
+ $html = '<table style="border: 1px" cellspacing="0">'
. "\n";
foreach ($causes as $i => $cause) {
- $html .= '<tr><td colspan="3"
bgcolor="#ff9999">'
+ $html .= '<tr><td colspan="3" style="background:
#ff9999">'
. str_repeat('-', $i) . ' <b>' . $cause['class']
. '</b>: '
. htmlspecialchars($cause['message']) . ' in <b>' .
$cause['file'] . '</b> '
. 'on line <b>' . $cause['line'] . '</b>'
. "</td></tr>\n";
}
- $html .= '<tr><td colspan="3" bgcolor="#aaaaaa"
align="center"><b>Exception trace</b></td></tr>' .
"\n"
- . '<tr><td align="center" bgcolor="#cccccc"
width="20"><b>#</b></td>'
- . '<td align="center"
bgcolor="#cccccc"><b>Function</b></td>'
- . '<td align="center"
bgcolor="#cccccc"><b>Location</b></td></tr>' .
"\n";
+ $html .= '<tr><td colspan="3" style="background-color:
#aaaaaa; text-align: center; font-weight: bold;">Exception trace</td></tr>'
. "\n"
+ . '<tr><td style="text-align: center; background: #cccccc;
width:20px; font-weight: bold;">#</td>'
+ . '<td style="text-align: center; background: #cccccc; font-weight:
bold;">Function</td>'
+ . '<td style="text-align: center; background: #cccccc; font-weight:
bold;">Location</td></tr>' . "\n";
foreach ($trace as $k => $v) {
- $html .= '<tr><td align="center">' . $k .
'</td>'
+ $html .= '<tr><td style="text-align: center;">' . $k .
'</td>'
. '<td>';
if (!empty($v['class'])) {
$html .= $v['class'] . $v['type'];
@@ -367,7 +367,7 @@
. ':' . (isset($v['line']) ? $v['line'] :
'unknown')
. '</td></tr>' . "\n";
}
- $html .= '<tr><td align="center">' . ($k+1) .
'</td>'
+ $html .= '<tr><td style="text-align: center;">' . ($k+1) .
'</td>'
. '<td>{main}</td>'
. '<td> </td></tr>' . "\n"
. '</table>';
@@ -386,6 +386,4 @@
}
return $causeMsg . $this->getTraceAsString();
}
-}
-
-?>
\ No newline at end of file
+}
\ No newline at end of file