Skip to content

Commit 3ebefa4

Browse files
authored
Merge pull request #1028 from cakephp/zend-assertions
Show warning if zend.assertions is not enabled.
2 parents 57b650c + bae0857 commit 3ebefa4

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/Panel/EnvironmentPanel.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ protected function _prepare(): array
6262
'error_reporting' => ini_get('error_reporting'),
6363
'upload_max_filesize' => ini_get('upload_max_filesize'),
6464
'post_max_size' => ini_get('post_max_size'),
65+
'zend.assertions' => ini_get('zend.assertions'),
6566
];
6667

6768
// CakePHP Data

templates/element/environment_panel.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@
3434
<div class="c-environment-panel">
3535
<h2>CakePHP Version: <?= Configure::version() ?></h2>
3636

37+
<?php if (ini_get('zend.assertions') !== '1') : ?>
38+
<div class="c-flash c-flash--warning">
39+
You should set <code>zend.assertions</code> to <code>1</code>
40+
in your <code>php.ini</code> for your development environment.
41+
</div>
42+
<?php endif; ?>
43+
3744
<h3>Application Constants</h3>
3845

3946
<?php if (!empty($app)) : ?>

0 commit comments

Comments
 (0)