Changeset 2094 in ExiteCMS


Ignore:
Timestamp:
12/06/08 22:42:30 (3 years ago)
Author:
WanWizard
Message:

fixed some PHP notice errors
moved the check on PHP debugging mode up, so it gets processed asap

Location:
trunk/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/core_functions.php

    r2074 r2094  
    5656} 
    5757 
     58// store the magic quotes setting 
     59define("QUOTES_GPC", (ini_get('magic_quotes_gpc') ? TRUE : FALSE)); 
     60 
     61// Browser window dimensions (assume 1024x768 if no cookies found) 
     62define("BROWSER_WIDTH", isset($_COOKIE['width']) ? $_COOKIE['width'] : 1024); 
     63define("BROWSER_HEIGHT", isset($_COOKIE['height']) ? $_COOKIE['height'] : 768); 
     64 
    5865// disable the standard PHP include path (empty's not accepted?) 
    5966ini_set('include_path', '.'); 
     
    109116while ($data = dbarray($result)) { 
    110117    $settings[$data['cfg_name']] = $data['cfg_value']; 
     118} 
     119 
     120// activate PHP error reporting 
     121if (isset($settings['debug_php_errors']) && $settings['debug_php_errors']) { 
     122    error_reporting(E_ALL); 
    111123} 
    112124 
     
    173185    define("USER_IP", '0.0.0.0'); 
    174186} 
    175 // store the magic quotes setting 
    176 define("QUOTES_GPC", (ini_get('magic_quotes_gpc') ? TRUE : FALSE)); 
    177  
    178 // Browser window dimensions (assume 1024x768 if no cookies found) 
    179 define("BROWSER_WIDTH", isset($_COOKIE['width']) ? $_COOKIE['width'] : 1024); 
    180 define("BROWSER_HEIGHT", isset($_COOKIE['height']) ? $_COOKIE['height'] : 768); 
    181187 
    182188// load the user functions 
     
    185191// set the query log debugging switch, enable error reporting if needed 
    186192$_db_log = checkgroup($settings['debug_querylog'], false); 
    187  
    188 // activate PHP error reporting 
    189 if (isset($settings['debug_php_errors']) && $settings['debug_php_errors']) { 
    190     error_reporting(E_ALL); 
    191 } 
    192193 
    193194// load the locale functions 
  • trunk/includes/db_functions.php

    r1991 r2094  
    101101 
    102102    // bail out if an error occurred and we're NOT in CLI mode! 
    103     if (!CMS_CLI && !$result) { 
     103    if ((defined('CMS_CLI') && !CMS_CLI) && !$result) { 
    104104        if ($display || $settings['debug_querylog']) { 
    105105            echo "<pre><br />Query: ".$query."<br />"; 
Note: See TracChangeset for help on using the changeset viewer.