Revert "Used ternary operator instead of "or" for constant definition"

This reverts commit 2bb6f13505e212d68841a7e6609806fb30d04002.
This commit is contained in:
Alexander Makarov
2014-03-06 01:56:51 +04:00
parent 7bc181ce44
commit 386979d6a3
38 changed files with 105 additions and 105 deletions

View File

@ -24,14 +24,14 @@ Like any resource in your Yii application, the bootstrap file can be edited to f
The default bootstrap structure sets `YII_DEBUG` to `false` if not defined:
```php
defined('YII_DEBUG') ?: define('YII_DEBUG', false);
defined('YII_DEBUG') or define('YII_DEBUG', false);
```
During development, you can change this to `true`:
```php
define('YII_DEBUG', true); // Development only
defined('YII_DEBUG') ?: define('YII_DEBUG', false);
defined('YII_DEBUG') or define('YII_DEBUG', false);
```
Configuring the application instance

View File

@ -40,11 +40,11 @@ code like the following:
* @license http://www.yiiframework.com/license/
*/
defined('YII_DEBUG') ?: define('YII_DEBUG', true);
defined('YII_DEBUG') or define('YII_DEBUG', true);
// fcgi doesn't have STDIN and STDOUT defined by default
defined('STDIN') ?: define('STDIN', fopen('php://stdin', 'r'));
defined('STDOUT') ?: define('STDOUT', fopen('php://stdout', 'w'));
defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));
defined('STDOUT') or define('STDOUT', fopen('php://stdout', 'w'));
require(__DIR__ . '/vendor/autoload.php');
require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php');

View File

@ -76,7 +76,7 @@ return [
By default it's automatically set to `3` if Yii is run in debug mode i.e. your `index.php` file contains the following:
```php
defined('YII_DEBUG') ?: define('YII_DEBUG', true);
defined('YII_DEBUG') or define('YII_DEBUG', true);
```
> Note: Make sure to disable debug mode on production since it may have significan performance effect and expose sensible

View File

@ -28,7 +28,7 @@ is to disable debug mode. A Yii application runs in debug mode if the constant
should be in your `index.php`:
```php
defined('YII_DEBUG') ?: define('YII_DEBUG', false);
defined('YII_DEBUG') or define('YII_DEBUG', false);
```
Debug mode is very useful during development stage, but it would impact performance