Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php final class DarkConsoleErrorLogPlugin extends DarkConsolePlugin { public functio..
Decoded Output download
<?php
final class DarkConsoleErrorLogPlugin extends DarkConsolePlugin {
public function getName() {
$count = count($this->getData());
if ($count) {
return pht('Error Log (%d)', $count);
}
return pht('Error Log');
}
public function getOrder() {
return 0;
}
public function getColor() {
if (count($this->getData())) {
return '#ff0000';
}
return null;
}
public function getDescription() {
return pht('Shows errors and warnings.');
}
public function generateData() {
return DarkConsoleErrorLogPluginAPI::getErrors();
}
public function renderPanel() {
$data = $this->getData();
$rows = array();
$details = array();
foreach ($data as $index => $row) {
$file = $row['file'];
$line = $row['line'];
$tag = javelin_tag(
'a',
array(
'sigil' => 'darkconsole-expand',
'meta' => array(
'expandID' => 'row-details-'.$index,
),
),
$row['str'].' at ['.basename($file).':'.$line.']');
$rows[] = array($tag);
$details[] = hsprintf(
'<div class="dark-console-panel-error-details" id="row-details-%s">'.
"%s
Stack trace:
",
$index,
$row['details']);
foreach ($row['trace'] as $key => $entry) {
$line = '';
if (isset($entry['class'])) {
$line .= $entry['class'].'::';
}
$line .= idx($entry, 'function', '');
$href = null;
if (isset($entry['file'])) {
$line .= ' called at ['.$entry['file'].':'.$entry['line'].']';
}
$details[] = $line;
$details[] = "
";
}
$details[] = hsprintf('</div>');
}
$table = new AphrontTableView($rows);
$table->setClassName('error-log');
$table->setHeaders(array(pht('Error')));
$table->setNoDataString(pht('No errors.'));
return phutil_tag(
'div',
array(),
array(
phutil_tag('div', array(), $table->render()),
phutil_tag('pre', array('class' => 'PhabricatorMonospaced'), $details),
));
}
}
?>
Did this file decode correctly?
Original Code
<?php
final class DarkConsoleErrorLogPlugin extends DarkConsolePlugin {
public function getName() {
$count = count($this->getData());
if ($count) {
return pht('Error Log (%d)', $count);
}
return pht('Error Log');
}
public function getOrder() {
return 0;
}
public function getColor() {
if (count($this->getData())) {
return '#ff0000';
}
return null;
}
public function getDescription() {
return pht('Shows errors and warnings.');
}
public function generateData() {
return DarkConsoleErrorLogPluginAPI::getErrors();
}
public function renderPanel() {
$data = $this->getData();
$rows = array();
$details = array();
foreach ($data as $index => $row) {
$file = $row['file'];
$line = $row['line'];
$tag = javelin_tag(
'a',
array(
'sigil' => 'darkconsole-expand',
'meta' => array(
'expandID' => 'row-details-'.$index,
),
),
$row['str'].' at ['.basename($file).':'.$line.']');
$rows[] = array($tag);
$details[] = hsprintf(
'<div class="dark-console-panel-error-details" id="row-details-%s">'.
"%s\nStack trace:\n",
$index,
$row['details']);
foreach ($row['trace'] as $key => $entry) {
$line = '';
if (isset($entry['class'])) {
$line .= $entry['class'].'::';
}
$line .= idx($entry, 'function', '');
$href = null;
if (isset($entry['file'])) {
$line .= ' called at ['.$entry['file'].':'.$entry['line'].']';
}
$details[] = $line;
$details[] = "\n";
}
$details[] = hsprintf('</div>');
}
$table = new AphrontTableView($rows);
$table->setClassName('error-log');
$table->setHeaders(array(pht('Error')));
$table->setNoDataString(pht('No errors.'));
return phutil_tag(
'div',
array(),
array(
phutil_tag('div', array(), $table->render()),
phutil_tag('pre', array('class' => 'PhabricatorMonospaced'), $details),
));
}
}
Function Calls
None |
Stats
MD5 | f6e78fa690245708d5764ab1a40038bd |
Eval Count | 0 |
Decode Time | 109 ms |