Skip to content

Commit ca07485

Browse files
committed
Use Debugger to output constant values.
As of PHP 5.6 constants can contain non-scalar data. Debugger::exportVar() handles all sorts of data more gracefully. Refs #401
1 parent 5a1f567 commit ca07485

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Template/Element/environment_panel.ctp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* @link http://cakephp.org CakePHP(tm) Project
1515
* @license http://www.opensource.org/licenses/mit-license.php MIT License
1616
*/
17+
use Cake\Error\Debugger;
1718
use Cake\Utility\Inflector;
1819
?>
1920

@@ -31,7 +32,7 @@ use Cake\Utility\Inflector;
3132
<?php foreach ($app as $key => $val): ?>
3233
<tr>
3334
<td><?= h($key) ?></td>
34-
<td><?= h($val) ?></td>
35+
<td><?= h(Debugger::exportVar($val)) ?></td>
3536
</tr>
3637
<?php endforeach; ?>
3738
</tbody>
@@ -56,7 +57,7 @@ use Cake\Utility\Inflector;
5657
<?php foreach ($cake as $key => $val): ?>
5758
<tr>
5859
<td><?= h($key) ?></td>
59-
<td><?= h($val) ?></td>
60+
<td><?= h(Debugger::exportVar($val)) ?></td>
6061
</tr>
6162
<?php endforeach; ?>
6263
</tbody>
@@ -107,7 +108,7 @@ use Cake\Utility\Inflector;
107108
<?php foreach ($hidef as $key => $val): ?>
108109
<tr>
109110
<td><?= h($key) ?></td>
110-
<td><?= h($val) ?></td>
111+
<td><?= h(Debugger::exportVar($val)) ?></td>
111112
</tr>
112113
<?php endforeach; ?>
113114
</tbody>

0 commit comments

Comments
 (0)