Skip to content

Commit 0e9762a

Browse files
author
Samuel Akopyan
committed
Added parent::__construct(); to each component class
1 parent af9c39c commit 0e9762a

12 files changed

+20
-0
lines changed

framework/components/CClientScript.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ class CClientScript extends CComponent
7676
*/
7777
function __construct()
7878
{
79+
parent::__construct();
7980
}
8081

8182
/**

framework/components/CComponent.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public static function __callStatic($method, $args)
6060
* return parent::init(__CLASS__);
6161
* }
6262
* </pre>
63+
* @return mixed
6364
*/
6465
private static function _parentInit($className = __CLASS__)
6566
{

framework/components/CDbHttpSession.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ class CDbHttpSession extends CComponent
6666
*/
6767
function __construct()
6868
{
69+
parent::__construct();
70+
6971
$this->_db = CDatabase::init();
7072

7173
@session_set_save_handler(

framework/components/CHttpCookie.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ class CHttpCookie extends CComponent
4343
*/
4444
function __construct()
4545
{
46+
parent::__construct();
47+
4648
if (CConfig::get('cookies.domain') != '') {
4749
$this->setDomain(CConfig::get('cookies.domain'));
4850
}

framework/components/CHttpRequest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ class CHttpRequest extends CComponent
101101
*/
102102
function __construct()
103103
{
104+
parent::__construct();
105+
104106
$this->_csrfValidation = (CConfig::get('validation.csrf.enable') === true) ? true : false;
105107
$this->_csrfExclude = CConfig::exists('validation.csrf.exclude') ? CConfig::get('validation.csrf.exclude')
106108
: [];

framework/components/CHttpSession.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ class CHttpSession extends CComponent
6464
*/
6565
function __construct()
6666
{
67+
parent::__construct();
68+
6769
if ($this->_cookieMode !== 'only') {
6870
$this->_setCookieMode($this->_cookieMode);
6971
}

framework/components/CLocalTime.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class CLocalTime extends CComponent
2828
*/
2929
function __construct()
3030
{
31+
parent::__construct();
3132
}
3233

3334
/**

framework/components/CLogger.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ class CLogger extends CComponent
4444
*/
4545
function __construct()
4646
{
47+
parent::__construct();
48+
4749
$this->_enabled = CConfig::get('log.enable') !== '' ? CConfig::get('log.enable') : false;
4850
$this->_logPath = APPHP_PATH.DS.(CConfig::get('log.path') !== '' ? CConfig::get('log.path') : 'protected/tmp/logs/');
4951
$this->_fileExtension = CConfig::exists('log.fileExtension') && CConfig::get('log.fileExtension') !== '' ? ltrim(CConfig::get('log.fileExtension'), '.') : 'php';

framework/components/CMessageSource.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ class CMessageSource extends CComponent
2929
*/
3030
function __construct()
3131
{
32+
parent::__construct();
33+
3234
$this->_basePath = dirname(__FILE__);
3335
}
3436

framework/components/CMobileDetect.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class CMobileDetect extends CComponent
3232
*/
3333
function __construct()
3434
{
35+
parent::__construct();
3536
}
3637

3738
/**

0 commit comments

Comments
 (0)