Index: trunk/core/kernel/application.php =================================================================== diff -u -N -r4790 -r4814 --- trunk/core/kernel/application.php (.../application.php) (revision 4790) +++ trunk/core/kernel/application.php (.../application.php) (revision 4814) @@ -1834,7 +1834,7 @@ $this->Debugger->dumpVars($_REQUEST); $this->Debugger->appendTrace(); - $error_msg = ''.$msg.' ('.$code.')
SQL: '.$this->Debugger->formatSQL($sql); + $error_msg = ''.$msg.' ('.$code.')
SQL: '.$this->Debugger->formatSQL($sql); $long_id = $this->Debugger->mapLongError($error_msg); trigger_error( substr($msg.' ('.$code.') ['.$sql.']',0,1000).' #'.$long_id, $errorLevel); return true; Index: trunk/core/kernel/utility/debugger.php =================================================================== diff -u -N -r4758 -r4814 --- trunk/core/kernel/utility/debugger.php (.../debugger.php) (revision 4758) +++ trunk/core/kernel/utility/debugger.php (.../debugger.php) (revision 4814) @@ -1,44 +1,42 @@ $rq_value) - { - if( substr($rq_name,0,6)=='debug_' ) - { + foreach ($_REQUEST as $rq_name => $rq_value) { + if (substr($rq_name, 0, 6) == 'debug_') { dbg_safeDefine('DBG_ZEND_PRESENT', 1); break; } } - dbg_safeDefine('DBG_ZEND_PRESENT',0); + dbg_safeDefine('DBG_ZEND_PRESENT', 0); // set default values for debugger constants - $dbg_constMap=Array('DBG_OPTIONS'=>0, - 'DBG_USE_HIGHLIGHT'=>1, - 'DBG_USE_SHUTDOWN_FUNC'=>DBG_ZEND_PRESENT?0:1, - 'DBG_HANDLE_ERRORS'=>DBG_ZEND_PRESENT?0:1, - 'DBG_IGNORE_STRICT_ERRORS'=>1, - 'DBG_DOMVIEWER'=>'/temp/domviewer.html', - 'DOC_ROOT'=> str_replace('\\', '/', realpath($_SERVER['DOCUMENT_ROOT']) ), // windows hack - 'DBG_LOCAL_BASE_PATH'=>'w:'); + $dbg_constMap = Array( + 'DBG_OPTIONS' => 0, + 'DBG_USE_HIGHLIGHT' => 1, + 'DBG_USE_SHUTDOWN_FUNC' => DBG_ZEND_PRESENT ? 0 : 1, + 'DBG_HANDLE_ERRORS' => DBG_ZEND_PRESENT ? 0 : 1, + 'DBG_IGNORE_STRICT_ERRORS' => 1, + 'DBG_DOMVIEWER' => '/temp/domviewer.html', + 'DOC_ROOT' => str_replace('\\', '/', realpath($_SERVER['DOCUMENT_ROOT']) ), // windows hack + 'DBG_LOCAL_BASE_PATH' => 'w:' + ); - foreach($dbg_constMap as $dbg_constName=>$dbg_constValue) - { - dbg_safeDefine($dbg_constName,$dbg_constValue); + foreach ($dbg_constMap as $dbg_constName => $dbg_constValue) { + dbg_safeDefine($dbg_constName, $dbg_constValue); } // only for IE, in case if no windows php script editor defined @@ -51,8 +49,10 @@ unset($dbg_editors,$dbg_editor); }*/ - class Debugger - { + class Debugger { + + var $IsFatalError = false; + /** * Debugger data for building report * @@ -62,16 +62,24 @@ var $ProfilerData = Array(); var $ProfilerTotals = Array(); var $ProfilerTotalCount = Array(); - var $RecursionStack = Array(); // prevent recursion when processing debug_backtrace() function results + + /** + * Prevent recursion when processing debug_backtrace() function results + * + * @var Array + */ + var $RecursionStack = Array(); - var $TraceNextError=false; - var $Options = 0; - var $OptionsMap = Array('shutdown_func' => 1, 'error_handler' => 2, - 'output_buffer' => 4, 'highlight_output' => 8); + var $OptionsMap = Array('shutdown_func' => 1, 'error_handler' => 2, 'output_buffer' => 4, 'highlight_output' => 8); var $scrollbarWidth = 0; + /** + * Long errors are saved here, because trigger_error doesn't support error messages over 1KB in size + * + * @var Array + */ var $longErrors = Array(); /** @@ -92,6 +100,7 @@ function Debugger() { $this->dummyImage = PROTOCOL.SERVER_NAME.(defined('PORT')?':'.PORT : '').rtrim(BASE_PATH, '/').'/'.'kernel/admin_templates/img/spacer.gif'; + global $start; $this->profileStart('kernel4_startup', 'Startup and Initialization of kernel4', $start); $this->profileStart('script_runtime', 'Script runtime', $start); @@ -103,65 +112,62 @@ $this->appendRequest(); } - function initOptions() - { - - } - function mapLongError($msg) { - $key=$this->generateID(); - $this->longErrors[$key]=$msg; + $key = $this->generateID(); + $this->longErrors[$key] = $msg; return $key; } - function setOption($name,$value) + /*function initOptions() { - if( !isset($this->OptionsMap[$name]) ) die('undefined debugger option: ['.$name.']
'); - if($value) - { - $this->Options|=$this->OptionsMap[$name]; + + } + + function setOption($name, $value) + { + if (!isset($this->OptionsMap[$name])) { + die('undefined debugger option: ['.$name.']
'); } - else - { - $this->Options=$this->Options&~$this->OptionsMap[$name]; + + if ($value) { + $this->Options |= $this->OptionsMap[$name]; } + else { + $this->Options = $this->Options &~ $this->OptionsMap[$name]; + } } function getOption($name) { - if( !isset($this->OptionsMap[$name]) ) die('undefined debugger option: ['.$name.']
'); + if (!isset($this->OptionsMap[$name])) { + die('undefined debugger option: ['.$name.']
'); + } return ($this->Options & $this->OptionsMap[$name]) == $this->OptionsMap[$name]; - } - + }*/ + /** - * Set's flag, that next error that occurs will - * be prepended by backtrace results + * Appends all passed variable values (wihout variable names) to debug output * */ - function traceNext() - { - $this->TraceNextError = true; - } - function dumpVars() { $dumpVars = func_get_args(); - foreach($dumpVars as $varValue) - { + foreach ($dumpVars as $varValue) { $this->Data[] = Array('value' => $varValue, 'debug_type' => 'var_dump'); } } function prepareHTML($dataIndex) { $Data =& $this->Data[$dataIndex]; - if($Data['debug_type'] == 'html') return $Data['html']; + if ($Data['debug_type'] == 'html') { + return $Data['html']; + } - switch($Data['debug_type']) - { + switch ($Data['debug_type']) { case 'error': - $fileLink = $this->getFileLink($Data['file'],$Data['line']); + $fileLink = $this->getFileLink($Data['file'], $Data['line']); $ret = ''.$this->getErrorNameByCode($Data['no']).': '.$Data['str']; $ret .= ' in '.$fileLink.' on line '.$Data['line'].''; return $ret; @@ -172,38 +178,30 @@ break; case 'trace': - ini_set('memory_limit','500M'); + ini_set('memory_limit', '500M'); $trace =& $Data['trace']; - //return 'sorry'; - //return $this->highlightString(print_r($trace,true)); - - $i = 0; $traceCount = count($trace); $ret = ''; - while($i < $traceCount) - { + while ($i < $traceCount) { $traceRec =& $trace[$i]; $argsID = 'trace_args_'.$dataIndex.'_'.$i; $has_args = isset($traceRec['args']); - if(isset($traceRec['file'])) - { - $func_name=isset($traceRec['class'])?$traceRec['class'].$traceRec['type'].$traceRec['function']:$traceRec['function']; - $args_link = $has_args ? 'Function' : 'Function'; + if (isset($traceRec['file'])) { + $func_name = isset($traceRec['class']) ? $traceRec['class'].$traceRec['type'].$traceRec['function'] : $traceRec['function']; + $args_link = $has_args ? 'Function' : 'Function'; - $ret .= $args_link.': '.$this->getFileLink($traceRec['file'],$traceRec['line'],$func_name); + $ret .= $args_link.': '.$this->getFileLink($traceRec['file'], $traceRec['line'], $func_name); $ret .= ' in '.basename($traceRec['file']).' on line '.$traceRec['line'].'
'; } - else - { + else { $ret .= 'no file information available'; } // ensure parameter value is not longer then 200 symbols - if($has_args) - { + if ($has_args) { $this->processTraceArguments($traceRec['args']); $args = $this->highlightString(print_r($traceRec['args'], true)); $ret .= ''; @@ -218,7 +216,6 @@ $Data =& $this->ProfilerData[$profileKey]; $runtime = ($Data['ends'] - $Data['begins']); // in seconds - $totals_key = getArrayValue($Data, 'totalsKey'); if ($totals_key) { $total_before = $Data['totalsBefore']; @@ -265,48 +262,43 @@ if(!$traceArgs) return ''; $array_keys = array_keys($traceArgs); - foreach($array_keys as $argID) - { + foreach ($array_keys as $argID) { $argValue =& $traceArgs[$argID]; - if( is_array($argValue) || is_object($argValue) ) - { - if(is_object($argValue) && !in_array(get_class($argValue),$this->RecursionStack) ) - { + if (is_array($argValue) || is_object($argValue)) { + if (is_object($argValue) && !in_array(get_class($argValue),$this->RecursionStack)) { array_push($this->RecursionStack, get_class($argValue)); - if( strtolower(get_class($argValue)) == 'kfactory' || $this->isApplication($argValue) || strtolower(get_class($argValue)) == 'templateparser' ) - { + if (strtolower(get_class($argValue)) == 'kfactory' || $this->isApplication($argValue) || strtolower(get_class($argValue)) == 'templateparser') { $argValue = null; continue; } // object & not in stack - ok - settype($argValue,'array'); + settype($argValue, 'array'); $this->processTraceArguments($argValue); array_pop($this->RecursionStack); } - elseif(is_object($argValue) && in_array(get_class($argValue),$this->RecursionStack) ) - { + elseif (is_object($argValue) && in_array(get_class($argValue),$this->RecursionStack)) { // object & in stack - recursion $traceArgs[$argID] = '**** RECURSION ***'; } - else - { + else { // normal array here $this->processTraceArguments($argValue); } } - else - { + else { $traceArgs[$argID] = $this->cutStringForHTML($traceArgs[$argID]); } } } function cutStringForHTML($string) { - if( strlen($string) > 200 ) $string = substr($string,0,50).' ...'; + if (strlen($string) > 200) { + $string = substr($string,0,50).' ...'; + } return $string; } @@ -326,17 +318,14 @@ function highlightString($string) { - if( dbg_ConstOn('DBG_USE_HIGHLIGHT') ) - { - $string = str_replace( Array('\\', '/') , Array('_no_match_string_', '_n_m_s_'), $string); - $string = highlight_string('', true); - $string = str_replace( Array('_no_match_string_', '_n_m_s_'), Array('\\', '/'), $string); - return preg_replace('/<\?(.*)php(.*)\?>/Us', '\\2', $string); - } - else - { + if (!dbg_ConstOn('DBG_USE_HIGHLIGHT')) { return $string; } + + $string = str_replace( Array('\\', '/') , Array('_no_match_string_', '_n_m_s_'), $string); + $string = highlight_string('', true); + $string = str_replace( Array('_no_match_string_', '_n_m_s_'), Array('\\', '/'), $string); + return preg_replace('/<\?(.*)php(.*)\?>/Us', '\\2', $string); } function isGecko() @@ -346,13 +335,15 @@ function getFileLink($file, $lineno = 1, $title = '') { - if (!$title) $title = $file; + if (!$title) { + $title = $file; + } if ($this->isGecko()) { return ''.$title.''; } else { - return ''.$title.''; + return ''.$title.''; } } @@ -361,20 +352,29 @@ { return str_replace(DOC_ROOT, DBG_LOCAL_BASE_PATH, $remoteFile); } - + + /** + * Appends call trace till this method call + * + */ function appendTrace() { $trace = debug_backtrace(); array_shift($trace); $this->Data[] = Array('trace' => $trace, 'debug_type' => 'trace'); } - function appendMemoryUsage($msg, $used=null) + function appendMemoryUsage($msg, $used = null) { if (!isset($used)) $used = round(memory_get_usage()/1024); $this->appendHTML('Memory usage '.$msg.' '.$used.'Kb'); } - + + /** + * Appends HTML code whithout transformations + * + * @param string $html + */ function appendHTML($html) { $this->Data[] = Array('html' => $html,'debug_type' => 'html'); @@ -389,21 +389,21 @@ * @param string $type = {'append','prepend','replace'} * @return bool */ - function setHTMLByIndex($index,$html,$type='append') + function setHTMLByIndex($index, $html, $type = 'append') { - if( !isset($this->Data[$index]) || $this->Data[$index]['debug_type'] != 'html' ) - { + if (!isset($this->Data[$index]) || $this->Data[$index]['debug_type'] != 'html') { return false; } - switch ($type) - { + switch ($type) { case 'append': $this->Data[$index]['html'] .= '
'.$html; break; + case 'prepend': $this->Data[$index]['html'] = $this->Data[$index]['html'].'
'.$html; break; + case 'replace': $this->Data[$index]['html'] = $html; break; @@ -441,7 +441,7 @@ $this->appendHTML('ScriptName: '.$this->getFileLink($script,1,basename($script)).' ('.dirname($script).')'); - $this->appendHTML('DomViewer:  '); + $this->appendHTML('DomViewer:  '); ob_start(); ?> @@ -450,14 +450,11 @@ SrcNameValue $value) - { - if( !is_array($value) && trim($value) == '' ) - { + foreach ($_REQUEST as $key => $value) { + if(!is_array($value) && trim($value) == '') { $value = 'no value'; } - else - { + else { $value = htmlspecialchars(print_r($value, true)); } @@ -474,15 +471,14 @@ function appendSession() { - if( isset($_SESSION)&&$_SESSION ) - { + if(isset($_SESSION) && $_SESSION) { $this->appendHTML('PHP Session: ['.ini_get('session.name').']'); $this->dumpVars($_SESSION); $this->moveToBegin(2); } } - function profileStart($key, $description = null, $timeStamp=null) + function profileStart($key, $description = null, $timeStamp = null) { if (!isset($timeStamp)) { $timeStamp = $this->getMoment(); @@ -495,7 +491,7 @@ $this->Data[] = array('profile_key' => $key, 'debug_type' => 'profiler'); } - function profileFinish($key, $description = null, $timeStamp=null) + function profileFinish($key, $description = null, $timeStamp = null) { if (!isset($timeStamp)) { $timeStamp = $this->getMoment(); @@ -507,12 +503,13 @@ } } - function profilerAddTotal($total_key, $key=null, $value=null) + function profilerAddTotal($total_key, $key = null, $value = null) { if (!isset($this->ProfilerTotals[$total_key])) { $this->ProfilerTotals[$total_key] = 0; $this->ProfilerTotalCount[$total_key] = 0; } + if (!isset($value)) { $value = $this->ProfilerData[$key]['ends'] - $this->ProfilerData[$key]['begins']; } @@ -534,15 +531,15 @@ function generateID() { - list($usec, $sec) = explode(" ",microtime()); + list($usec, $sec) = explode(' ', microtime()); $id_part_1 = substr($usec, 4, 4); $id_part_2 = mt_rand(1,9); $id_part_3 = substr($sec, 6, 4); $digit_one = substr($id_part_1, 0, 1); if ($digit_one == 0) { $digit_one = mt_rand(1,9); - $id_part_1 = ereg_replace("^0","",$id_part_1); + $id_part_1 = ereg_replace("^0",'',$id_part_1); $id_part_1=$digit_one.$id_part_1; } return $id_part_1.$id_part_2.$id_part_3; @@ -551,8 +548,7 @@ function getErrorNameByCode($errorCode) { - switch($errorCode) - { + switch ($errorCode) { case E_USER_ERROR: return 'Fatal Error'; break; @@ -585,38 +581,33 @@ { $this->breakOutofBuffering(); if($this->reportDone) return ''; - - if( dbg_ConstOn('DBG_SKIP_REPORTING') ) return; - $this->profileFinish('script_runtime'); - if( dbg_ConstOn('DBG_ZEND_PRESENT') ) return; + + if( dbg_ConstOn('DBG_SKIP_REPORTING') || dbg_ConstOn('DBG_ZEND_PRESENT')) return ''; if (defined('SPACER_URL')) { $this->dummyImage = SPACER_URL; } - dbg_safeDefine('DBG_RAISE_ON_WARNINGS',0); + dbg_safeDefine('DBG_RAISE_ON_WARNINGS', 0); - $this->memoryUsage['debugger_start']=memory_get_usage(); + $this->memoryUsage['debugger_start'] = memory_get_usage(); // show php session if any $this->appendSession(); // ensure, that 1st line of debug output always is this one: - $this->appendHTML('Hide Debugger'); + $this->appendHTML('Hide Debugger'); $this->moveToBegin(1); - if( dbg_ConstOn('DBG_SQL_PROFILE') && isset($this->ProfilerTotals['sql']) ) - { + if(dbg_ConstOn('DBG_SQL_PROFILE') && isset($this->ProfilerTotals['sql'])) { $this->appendHTML('SQL Total time: '.$this->ProfilerTotals['sql'].' Number of queries: '.$this->ProfilerTotalCount['sql']); } - if( dbg_ConstOn('DBG_PROFILE_INCLUDES') && isset($this->ProfilerTotals['includes']) ) - { + if (dbg_ConstOn('DBG_PROFILE_INCLUDES') && isset($this->ProfilerTotals['includes'])) { $this->appendHTML('Included Files Total time: '.$this->ProfilerTotals['includes'].' Number of includes: '.$this->ProfilerTotalCount['includes']); } - if( dbg_ConstOn('DBG_PROFILE_MEMORY') ) - { + if (dbg_ConstOn('DBG_PROFILE_MEMORY')) { $this->appendHTML('Memory used by Objects: '.round($this->ProfilerTotals['objects']/1024, 2).'Kb'); } @@ -748,204 +739,198 @@ memoryUsage['debugger_finish']=memory_get_usage(); - $this->memoryUsage['print_report']=$this->memoryUsage['debugger_finish']-$this->memoryUsage['debugger_start']; - $this->memoryUsage['total']=$this->memoryUsage['print_report']+$this->memoryUsage['error_handling']; - $this->memoryUsage['application']=memory_get_usage()-$this->memoryUsage['total']; + if(dbg_ConstOn('DBG_SHOW_MEMORY_USAGE')) { + $this->memoryUsage['debugger_finish'] = memory_get_usage(); + $this->memoryUsage['print_report'] = $this->memoryUsage['debugger_finish']-$this->memoryUsage['debugger_start']; + $this->memoryUsage['total'] = $this->memoryUsage['print_report']+$this->memoryUsage['error_handling']; + $this->memoryUsage['application'] = memory_get_usage() - $this->memoryUsage['total']; } - if($returnResult) - { + if ($returnResult) { $ret = ob_get_contents(); - if($clean_output_buffer) ob_clean(); - if( dbg_ConstOn('DBG_SHOW_MEMORY_USAGE') ) $ret .= $this->getMemoryUsageReport(); + if ($clean_output_buffer) { + ob_clean(); + } + if (dbg_ConstOn('DBG_SHOW_MEMORY_USAGE')) { + $ret .= $this->getMemoryUsageReport(); + } $this->reportDone = true; return $ret; } - else - { - if( !dbg_ConstOn('DBG_HIDE_FULL_REPORT') ) - { + else { + if (!dbg_ConstOn('DBG_HIDE_FULL_REPORT')) { $this->breakOutofBuffering(); } - else - { - if($clean_output_buffer) ob_clean(); + elseif ($clean_output_buffer) { + ob_clean(); } - if( dbg_ConstOn('DBG_SHOW_MEMORY_USAGE') ) echo $this->getMemoryUsageReport(); + + if (dbg_ConstOn('DBG_SHOW_MEMORY_USAGE')) { + echo $this->getMemoryUsageReport(); + } $this->reportDone = true; } } @@ -988,11 +973,10 @@ function saveError($errno, $errstr, $errfile = '', $errline = '', $errcontext = '') { $memory_used=Array(); - $memory_used['begin']=memory_get_usage(); + $memory_used['begin'] = memory_get_usage(); $errorType = $this->getErrorNameByCode($errno); - if(!$errorType) - { + if (!$errorType) { trigger_error('Unknown error type ['.$errno.']', E_USER_ERROR); return false; } @@ -1006,54 +990,39 @@ unset($this->longErrors[$long_id]); } - - /*in /www/kostja/in-commerce4/kernel/kernel4/parser/construct_tags.php(177) : runtime-created function on line - - [PRE-PARSED block, $line 13]: Undefined variable: IdField*/ - /* - if( strpos($errfile,'runtime-created') !== false ) { - $errfile = ' PRE-PARSED block '.$this->CurrentPreParsedBlock.' '; - }*/ - - if( strpos($errfile,'eval()\'d code') !== false ) - { + if (strpos($errfile,'eval()\'d code') !== false) { $errstr = '[EVAL, line '.$errline.']: '.$errstr; $tmpStr = $errfile; $pos = strpos($tmpStr,'('); $errfile = substr($tmpStr,0,$pos); $pos++; $errline = substr($tmpStr,$pos,strpos($tmpStr,')',$pos)-$pos); } - // if($this->TraceNextError || $errno == E_USER_ERROR) - if($this->TraceNextError) - { - $this->appendTrace(); - $this->TraceNextError=false; - } + $this->Data[] = Array('no' => $errno, 'str' => $errstr, 'file' => $errfile, 'line' => $errline, 'context' => $errcontext, 'debug_type' => 'error'); $memory_used['end']=memory_get_usage(); $this->memoryUsage['error_handling']+=$memory_used['end']-$memory_used['begin']; - if( substr($errorType,0,5) == 'Fatal') - { + if (substr($errorType,0,5) == 'Fatal') { $this->breakOutofBuffering(false); - echo ''; + $this->IsFatalError = true; ob_flush(); - if( !dbg_ConstOn('DBG_USE_SHUTDOWN_FUNC') ) $this->printReport(); + if (!dbg_ConstOn('DBG_USE_SHUTDOWN_FUNC')) { + $this->printReport(); + } exit; } } + function breakOutofBuffering($flush = true) { - while (ob_get_level()) - { + while (ob_get_level()) { if ($flush) { ob_end_flush(); } else { ob_end_clean(); } } - //ob_end_flush(); } function saveToFile($msg) @@ -1107,33 +1076,30 @@ } function AttachToApplication() { - if( dbg_ConstOn('DBG_HANDLE_ERRORS') ) - { - if( class_exists('kApplication') ) - { - restore_error_handler(); - $application =& kApplication::Instance(); - $application->Debugger =& $this; - $application->errorHandlers[] = Array(&$this, 'saveError'); - } - else - { - set_error_handler( Array(&$this, 'saveError') ); - } + if (!dbg_ConstOn('DBG_HANDLE_ERRORS')) return true; + + if (class_exists('kApplication')) { + restore_error_handler(); + $application =& kApplication::Instance(); + $application->Debugger =& $this; + $application->errorHandlers[] = Array(&$this, 'saveError'); } + else { + set_error_handler( Array(&$this, 'saveError') ); + } } } - if( !function_exists('memory_get_usage') ) - { + if (!function_exists('memory_get_usage')) { function memory_get_usage(){ return -1; } } - if( !dbg_ConstOn('DBG_ZEND_PRESENT') ) - { + if(!dbg_ConstOn('DBG_ZEND_PRESENT')) { $debugger = new Debugger(); } - if( dbg_ConstOn('DBG_USE_SHUTDOWN_FUNC') ) register_shutdown_function( Array(&$debugger, 'printReport') ); + if (dbg_ConstOn('DBG_USE_SHUTDOWN_FUNC')) { + register_shutdown_function( Array(&$debugger, 'printReport') ); + } } ?> \ No newline at end of file Index: trunk/kernel/admin_templates/incs/header.tpl =================================================================== diff -u -N -r4785 -r4814 --- trunk/kernel/admin_templates/incs/header.tpl (.../header.tpl) (revision 4785) +++ trunk/kernel/admin_templates/incs/header.tpl (.../header.tpl) (revision 4814) @@ -46,6 +46,6 @@ -    +    \ No newline at end of file Index: trunk/kernel/include/adodb/adodb.inc.php =================================================================== diff -u -N -r3576 -r4814 --- trunk/kernel/include/adodb/adodb.inc.php (.../adodb.inc.php) (revision 3576) +++ trunk/kernel/include/adodb/adodb.inc.php (.../adodb.inc.php) (revision 4814) @@ -760,7 +760,7 @@ $debugger->dumpVars($_REQUEST); $debugger->appendTrace(); - $error_msg = ''.$m.' ('.$e.')
SQL: '.$debugger->formatSQL($sql); + $error_msg = ''.$m.' ('.$e.')
SQL: '.$debugger->formatSQL($sql); $long_id=$debugger->mapLongError($error_msg); trigger_error( substr($m.' ('.$e.') ['.$sql.']',0,1000).' #'.$long_id, $errorLevel); Index: trunk/kernel/action.php =================================================================== diff -u -N -r4803 -r4814 --- trunk/kernel/action.php (.../action.php) (revision 4803) +++ trunk/kernel/action.php (.../action.php) (revision 4814) @@ -1378,7 +1378,7 @@ // $img->debuglevel=1; - $img->Pending=false; + $img->Pending = true; if($LocalImage) { $file = $_FILES["imgFullFile"];