Ignore:
Timestamp:
2011/11/05 01:29:29 (12 years ago)
Author:
Seasoft
Message:

#1532 (SC_Initial#init 初期化の依存関係をコメントに記述する)
#1533 (SC_Initial#setErrorReporting #phpconfigInit に処理を移動)
#1534 (SC_Initial#phpconfigInit 不要な ini_set の利用を止める)
r21307 (バージョン変更 2.11.4 -> 2.11.5-dev) の実装誤りを修正。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_11-dev/data/class/SC_Initial.php

    r21307 r21310  
    3838 
    3939        /** EC-CUBEのバージョン */ 
    40         define('ECCUBE_VERSION', '2.11.4-dev'); 
     40        define('ECCUBE_VERSION', '2.11.5-dev'); 
    4141    } 
    4242 
     
    5252    function init() { 
    5353        $this->requireInitialConfig(); 
    54         $this->defineDSN(); 
    55         $this->setErrorReporting(); 
     54        $this->defineDSN();                 // requireInitialConfig メソッドより後で実行 
    5655        $this->defineDirectoryIndex(); 
    57         $this->defineErrorType(); 
    58         $this->defineConstants(); 
    59         $this->complementConstants(); 
    60         $this->phpconfigInit(); 
    61         $this->createCacheDir(); 
     56        $this->defineErrorType();           // XXX 多分、もっと後で大丈夫 
     57        $this->defineConstants();           // defineDirectoryIndex メソッドより後で実行 
     58        $this->complementConstants();       // defineConstants メソッドより後で実行 
     59        $this->phpconfigInit();             // defineConstants メソッドより後で実行 
     60        $this->createCacheDir();            // defineConstants メソッドより後で実行 
    6261        $this->stripslashesDeepGpc(); 
    63         $this->resetSuperglobalsRequest(); 
     62        $this->resetSuperglobalsRequest();  // stripslashesDeepGpc メソッドより後で実行 
    6463    } 
    6564 
     
    9594 
    9695    /** 
    97      * エラーレベル設定を行う. 
    98      * 
    99      * ・推奨値 
    100      *   開発時 - E_ALL 
    101      *   運用時 - E_ALL & ~E_NOTICE 
    102      * 
    103      * @access protected 
    104      * @return void 
     96     * @deprecated 
    10597     */ 
    10698    function setErrorReporting() { 
     
    121113     */ 
    122114    function phpconfigInit() { 
     115        // E_DEPRECATED 定数 (for PHP < 5.3) 
     116        // TODO バージョン互換処理に統合したい。 
     117        $this->defineIfNotDefined('E_DEPRECATED', 8192); 
     118 
     119        // エラーレベル設定 
     120        // 開発時は E_ALL を推奨 
     121        error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED); 
     122 
    123123        ini_set('display_errors', '1'); 
    124124        ini_set('html_errors', '1'); 
     
    127127        ini_set('auto_detect_line_endings', 1); 
    128128        ini_set('default_charset', CHAR_CODE); 
    129         ini_set('mbstring.internal_encoding', CHAR_CODE); 
    130129        ini_set('mbstring.detect_order', 'auto'); 
    131130        ini_set('mbstring.substitute_character', 'none'); 
     
    136135 
    137136        mb_internal_encoding(CHAR_CODE); // mb_language() より後で 
    138         // TODO 上の「ini_set('mbstring.internal_encoding', CHAR_CODE);」を削除できないか検討 
    139         // TODO .htaccess の mbstring.internal_encoding を削除できないか検討 
    140137 
    141138        ini_set('arg_separator.output', '&'); 
Note: See TracChangeset for help on using the changeset viewer.