Index: branches/5.2.x/core/kernel/application.php =================================================================== diff -u -r14572 -r14585 --- branches/5.2.x/core/kernel/application.php (.../application.php) (revision 14572) +++ branches/5.2.x/core/kernel/application.php (.../application.php) (revision 14585) @@ -1,6 +1,6 @@ GetVar('ajax') == 'yes' && !$this->GetVar('debug_ajax')) { // hide debug output from ajax requests automatically - define('DBG_SKIP_REPORTING', 1); + safeDefine('DBG_SKIP_REPORTING', 1); // safeDefine, because debugger also defines it } } elseif ($this->GetVar('admin')) { @@ -1038,7 +1038,8 @@ if ($this->UseOutputCompression()) { $compression_level = $this->ConfigValue('OutputCompressionLevel'); - if ($compression_level < 0 || $compression_level > 9) { + + if (!$compression_level || $compression_level < 0 || $compression_level > 9) { $compression_level = 7; } @@ -1389,7 +1390,7 @@ function ParseBlock($params, $pass_params = 0, $as_template = false) { if (substr($params['name'], 0, 5) == 'html:') { - return substr($params['name'], 6); + return substr($params['name'], 5); } return $this->Parser->ParseBlock($params, $pass_params, $as_template); @@ -1541,6 +1542,7 @@ else { if ($this->GetVar('ajax') == 'yes' && $t != $this->GetVar('t')) { // redirection to other then current template during ajax request + safeDefine('DBG_SKIP_REPORTING', 1); echo '#redirect#' . $location; } elseif (headers_sent() != '') { @@ -1651,6 +1653,11 @@ return $this->cacheManager->ConfigValue($name); } + function SetConfigValue($name, $value) + { + return $this->cacheManager->SetConfigValue($name, $value); + } + /** * Allows to process any type of event * @@ -2089,7 +2096,7 @@ if ( !(defined('DBG_IGNORE_STRICT_ERRORS') && DBG_IGNORE_STRICT_ERRORS && defined('E_STRICT') && ($errno == E_STRICT)) ) { $time = adodb_date('d/m/Y H:i:s'); - $fp = fopen(FULL_PATH . '/silent_log.txt', 'a'); + $fp = fopen((defined('RESTRICTED') ? RESTRICTED : FULL_PATH) . '/silent_log.txt', 'a'); fwrite($fp, '[' . $time . '] #' . $errno . ': ' . strip_tags($errstr) . ' in [' . $errfile . '] on line ' . $errline . "\n"); fclose($fp); } @@ -2131,12 +2138,12 @@ $args = ''; $type = isset($trace_info['type']) ? $trace_info['type'] : ''; - + if ( isset($trace_info['args']) ) { foreach ($trace_info['args'] as $argument) { if ( is_object($argument) ) { $args .= get_class($argument) . ' instance, '; - } + } else { $args .= is_array($argument) ? 'Array' : substr($argument, 0, 10) . ' ..., '; }