Skip to content

Commit

Permalink
Merge pull request #1028 from cakephp/zend-assertions
Browse files Browse the repository at this point in the history
Show warning if zend.assertions is not enabled.
  • Loading branch information
markstory authored Sep 26, 2024
2 parents 57b650c + bae0857 commit 3ebefa4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Panel/EnvironmentPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ protected function _prepare(): array
'error_reporting' => ini_get('error_reporting'),
'upload_max_filesize' => ini_get('upload_max_filesize'),
'post_max_size' => ini_get('post_max_size'),
'zend.assertions' => ini_get('zend.assertions'),
];

// CakePHP Data
Expand Down
7 changes: 7 additions & 0 deletions templates/element/environment_panel.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@
<div class="c-environment-panel">
<h2>CakePHP Version: <?= Configure::version() ?></h2>

<?php if (ini_get('zend.assertions') !== '1') : ?>
<div class="c-flash c-flash--warning">
You should set <code>zend.assertions</code> to <code>1</code>
in your <code>php.ini</code> for your development environment.
</div>
<?php endif; ?>

<h3>Application Constants</h3>

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

0 comments on commit 3ebefa4

Please sign in to comment.