Commit 386979d6 by Alexander Makarov

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

This reverts commit 2bb6f135.
parent 7bc181ce
......@@ -2,14 +2,14 @@
// the entry script URL (without host info) for functional and acceptance tests
// PLEASE ADJUST IT TO THE ACTUAL ENTRY SCRIPT URL
defined('TEST_ENTRY_URL') ?: define('TEST_ENTRY_URL', '/backend/web/index-test.php');
defined('TEST_ENTRY_URL') or define('TEST_ENTRY_URL', '/backend/web/index-test.php');
// the entry script file path for functional and acceptance tests
defined('TEST_ENTRY_FILE') ?: define('TEST_ENTRY_FILE', dirname(__DIR__) . '/web/index-test.php');
defined('TEST_ENTRY_FILE') or define('TEST_ENTRY_FILE', dirname(__DIR__) . '/web/index-test.php');
defined('YII_DEBUG') ?: define('YII_DEBUG', true);
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') ?: define('YII_ENV', 'test');
defined('YII_ENV') or define('YII_ENV', 'test');
require_once(__DIR__ . '/../../vendor/autoload.php');
......
......@@ -8,12 +8,12 @@
*/
// 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_once(__DIR__ . '/../../vendor/autoload.php');
require_once(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
require_once(__DIR__ . '/../../common/config/aliases.php');
defined('YII_DEBUG') ?: define('YII_DEBUG', true);
defined('YII_ENV') ?: define('YII_ENV', 'test');
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');
......@@ -9,8 +9,8 @@
*/
// 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_once(__DIR__ . '/../_console.php');
......
......@@ -9,8 +9,8 @@
*/
// 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_once(__DIR__ . '/../_console.php');
......
......@@ -9,8 +9,8 @@
*/
// 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_once(__DIR__ . '/../_console.php');
......
......@@ -2,14 +2,14 @@
// the entry script URL (without host info) for functional and acceptance tests
// PLEASE ADJUST IT TO THE ACTUAL ENTRY SCRIPT URL
defined('TEST_ENTRY_URL') ?: define('TEST_ENTRY_URL', '/index-test.php');
defined('TEST_ENTRY_URL') or define('TEST_ENTRY_URL', '/index-test.php');
// the entry script file path for functional and acceptance tests
defined('TEST_ENTRY_FILE') ?: define('TEST_ENTRY_FILE', dirname(__DIR__) . '/index-test.php');
defined('TEST_ENTRY_FILE') or define('TEST_ENTRY_FILE', dirname(__DIR__) . '/index-test.php');
defined('YII_DEBUG') ?: define('YII_DEBUG', true);
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') ?: define('YII_ENV', 'test');
defined('YII_ENV') or define('YII_ENV', 'test');
require_once(__DIR__ . '/../../vendor/autoload.php');
......
......@@ -8,12 +8,12 @@
*/
// 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_once(__DIR__ . '/../../vendor/autoload.php');
require_once(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
require_once(__DIR__ . '/../../common/config/aliases.php');
defined('YII_DEBUG') ?: define('YII_DEBUG', true);
defined('YII_ENV') ?: define('YII_ENV', 'test');
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');
......@@ -9,8 +9,8 @@
*/
// 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_once(__DIR__ . '/../_console.php');
......
......@@ -2,14 +2,14 @@
// the entry script URL (without host info) for functional and acceptance tests
// PLEASE ADJUST IT TO THE ACTUAL ENTRY SCRIPT URL
defined('TEST_ENTRY_URL') ?: define('TEST_ENTRY_URL', '/index-test.php');
defined('TEST_ENTRY_URL') or define('TEST_ENTRY_URL', '/index-test.php');
// the entry script file path for functional and acceptance tests
defined('TEST_ENTRY_FILE') ?: define('TEST_ENTRY_FILE', dirname(__DIR__) . '/index-test.php');
defined('TEST_ENTRY_FILE') or define('TEST_ENTRY_FILE', dirname(__DIR__) . '/index-test.php');
defined('YII_DEBUG') ?: define('YII_DEBUG', true);
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') ?: define('YII_ENV', 'test');
defined('YII_ENV') or define('YII_ENV', 'test');
require_once(__DIR__ . '/../../vendor/autoload.php');
......
......@@ -8,12 +8,12 @@
*/
// 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_once(__DIR__ . '/../../vendor/autoload.php');
require_once(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
require_once(__DIR__ . '/../../common/config/aliases.php');
defined('YII_DEBUG') ?: define('YII_DEBUG', true);
defined('YII_ENV') ?: define('YII_ENV', 'test');
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');
......@@ -9,8 +9,8 @@
*/
// 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_once(__DIR__ . '/../_console.php');
......
......@@ -5,8 +5,8 @@ if (!in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'])) {
die('You are not allowed to access this file.');
}
defined('YII_DEBUG') ?: define('YII_DEBUG', true);
defined('YII_ENV') ?: define('YII_ENV', 'test');
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');
require(__DIR__ . '/../../vendor/autoload.php');
require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
......
<?php
defined('YII_DEBUG') ?: define('YII_DEBUG', true);
defined('YII_ENV') ?: define('YII_ENV', 'dev');
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
require(__DIR__ . '/../../vendor/autoload.php');
require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
......
......@@ -5,8 +5,8 @@ if (!in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'])) {
die('You are not allowed to access this file.');
}
defined('YII_DEBUG') ?: define('YII_DEBUG', true);
defined('YII_ENV') ?: define('YII_ENV', 'test');
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');
require(__DIR__ . '/../../vendor/autoload.php');
require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
......
<?php
defined('YII_DEBUG') ?: define('YII_DEBUG', true);
defined('YII_ENV') ?: define('YII_ENV', 'dev');
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
require(__DIR__ . '/../../vendor/autoload.php');
require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
......
......@@ -8,12 +8,12 @@
* @license http://www.yiiframework.com/license/
*/
defined('YII_DEBUG') ?: define('YII_DEBUG', true);
defined('YII_ENV') ?: define('YII_ENV', 'dev');
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
// 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');
......
<?php
defined('YII_DEBUG') ?: define('YII_DEBUG', false);
defined('YII_ENV') ?: define('YII_ENV', 'prod');
defined('YII_DEBUG') or define('YII_DEBUG', false);
defined('YII_ENV') or define('YII_ENV', 'prod');
require(__DIR__ . '/../../vendor/autoload.php');
require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
......
<?php
defined('YII_DEBUG') ?: define('YII_DEBUG', false);
defined('YII_ENV') ?: define('YII_ENV', 'prod');
defined('YII_DEBUG') or define('YII_DEBUG', false);
defined('YII_ENV') or define('YII_ENV', 'prod');
require(__DIR__ . '/../../vendor/autoload.php');
require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
......
......@@ -8,12 +8,12 @@
* @license http://www.yiiframework.com/license/
*/
defined('YII_DEBUG') ?: define('YII_DEBUG', false);
defined('YII_ENV') ?: define('YII_ENV', 'prod');
defined('YII_DEBUG') or define('YII_DEBUG', false);
defined('YII_ENV') or define('YII_ENV', 'prod');
// 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');
......
......@@ -2,14 +2,14 @@
// the entry script URL (without host info) for functional and acceptance tests
// PLEASE ADJUST IT TO THE ACTUAL ENTRY SCRIPT URL
defined('TEST_ENTRY_URL') ?: define('TEST_ENTRY_URL', '/frontend/web/index-test.php');
defined('TEST_ENTRY_URL') or define('TEST_ENTRY_URL', '/frontend/web/index-test.php');
// the entry script file path for functional and acceptance tests
defined('TEST_ENTRY_FILE') ?: define('TEST_ENTRY_FILE', dirname(__DIR__) . '/web/index-test.php');
defined('TEST_ENTRY_FILE') or define('TEST_ENTRY_FILE', dirname(__DIR__) . '/web/index-test.php');
defined('YII_DEBUG') ?: define('YII_DEBUG', true);
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') ?: define('YII_ENV', 'test');
defined('YII_ENV') or define('YII_ENV', 'test');
require_once(__DIR__ . '/../../vendor/autoload.php');
......
......@@ -8,12 +8,12 @@
*/
// 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_once(__DIR__ . '/../../vendor/autoload.php');
require_once(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
require_once(__DIR__ . '/../../common/config/aliases.php');
defined('YII_DEBUG') ?: define('YII_DEBUG', true);
defined('YII_ENV') ?: define('YII_ENV', 'test');
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');
......@@ -9,8 +9,8 @@
*/
// 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_once(__DIR__ . '/../_console.php');
......
......@@ -9,8 +9,8 @@
*/
// 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_once(__DIR__ . '/../_console.php');
......
......@@ -9,8 +9,8 @@
*/
// 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_once(__DIR__ . '/../_console.php');
......
......@@ -2,14 +2,14 @@
// the entry script URL (without host info) for functional and acceptance tests
// PLEASE ADJUST IT TO THE ACTUAL ENTRY SCRIPT URL
defined('TEST_ENTRY_URL') ?: define('TEST_ENTRY_URL', '/basic/web/index-test.php');
defined('TEST_ENTRY_URL') or define('TEST_ENTRY_URL', '/basic/web/index-test.php');
// the entry script file path for functional and acceptance tests
defined('TEST_ENTRY_FILE') ?: define('TEST_ENTRY_FILE', dirname(__DIR__) . '/web/index-test.php');
defined('TEST_ENTRY_FILE') or define('TEST_ENTRY_FILE', dirname(__DIR__) . '/web/index-test.php');
defined('YII_DEBUG') ?: define('YII_DEBUG', true);
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') ?: define('YII_ENV', 'test');
defined('YII_ENV') or define('YII_ENV', 'test');
require_once(__DIR__ . '/../vendor/autoload.php');
......
<?php
defined('YII_DEBUG') ?: define('YII_DEBUG', true);
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') ?: define('YII_ENV', 'test');
defined('YII_ENV') or define('YII_ENV', 'test');
// 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');
......@@ -5,8 +5,8 @@ if (!in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'])) {
die('You are not allowed to access this file.');
}
defined('YII_DEBUG') ?: define('YII_DEBUG', true);
defined('YII_ENV') ?: define('YII_ENV', 'test');
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');
require(__DIR__ . '/../vendor/autoload.php');
require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php');
......
<?php
// comment out the following two lines when deployed to production
defined('YII_DEBUG') ?: define('YII_DEBUG', true);
defined('YII_ENV') ?: define('YII_ENV', 'dev');
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
require(__DIR__ . '/../vendor/autoload.php');
require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php');
......
......@@ -8,11 +8,11 @@
* @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');
......
<?php
defined('YII_DEBUG') ?: define('YII_DEBUG', false);
defined('YII_DEBUG') or define('YII_DEBUG', false);
require(__DIR__ . '/protected/vendor/yiisoft/yii2/Yii.php');
......
......@@ -9,8 +9,8 @@
*/
// 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'));
define('YII_DEBUG', true);
......
......@@ -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
......
......@@ -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');
......
......@@ -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
......
......@@ -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
......
......@@ -8,7 +8,7 @@
* @license http://www.yiiframework.com/license/
*/
defined('YII_DEBUG') ?: define('YII_DEBUG', false);
defined('YII_DEBUG') or define('YII_DEBUG', false);
$composerAutoload = [
__DIR__ . '/vendor/autoload.php', // standalone with "composer install" run
......
......@@ -14,37 +14,37 @@ use yii\log\Logger;
/**
* Gets the application start timestamp.
*/
defined('YII_BEGIN_TIME') ?: define('YII_BEGIN_TIME', microtime(true));
defined('YII_BEGIN_TIME') or define('YII_BEGIN_TIME', microtime(true));
/**
* This constant defines the framework installation directory.
*/
defined('YII_PATH') ?: define('YII_PATH', __DIR__);
defined('YII_PATH') or define('YII_PATH', __DIR__);
/**
* This constant defines whether the application should be in debug mode or not. Defaults to false.
*/
defined('YII_DEBUG') ?: define('YII_DEBUG', false);
defined('YII_DEBUG') or define('YII_DEBUG', false);
/**
* This constant defines in which environment the application is running. Defaults to 'prod', meaning production environment.
* You may define this constant in the bootstrap script. The value could be 'prod' (production), 'dev' (development), 'test', 'staging', etc.
*/
defined('YII_ENV') ?: define('YII_ENV', 'prod');
defined('YII_ENV') or define('YII_ENV', 'prod');
/**
* Whether the the application is running in production environment
*/
defined('YII_ENV_PROD') ?: define('YII_ENV_PROD', YII_ENV === 'prod');
defined('YII_ENV_PROD') or define('YII_ENV_PROD', YII_ENV === 'prod');
/**
* Whether the the application is running in development environment
*/
defined('YII_ENV_DEV') ?: define('YII_ENV_DEV', YII_ENV === 'dev');
defined('YII_ENV_DEV') or define('YII_ENV_DEV', YII_ENV === 'dev');
/**
* Whether the the application is running in testing environment
*/
defined('YII_ENV_TEST') ?: define('YII_ENV_TEST', YII_ENV === 'test');
defined('YII_ENV_TEST') or define('YII_ENV_TEST', YII_ENV === 'test');
/**
* This constant defines whether error handling should be enabled. Defaults to true.
*/
defined('YII_ENABLE_ERROR_HANDLER') ?: define('YII_ENABLE_ERROR_HANDLER', true);
defined('YII_ENABLE_ERROR_HANDLER') or define('YII_ENABLE_ERROR_HANDLER', true);
/**
......
......@@ -8,11 +8,11 @@
* @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__ . '/Yii.php');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment