Skip to content

Commit

Permalink
Merge branch 'v3/3.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
breath-co2 committed Aug 5, 2013
2 parents 969a5c1 + 9daa5b0 commit 51eb16c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bin/view-error500-log
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ else

if (is_file($file))
{
$data = @unserialize(gzuncompress(base64_decode(file_get_contents($file))));
$data = @unserialize(file_get_contents($file));
if ($data)
{
$obj = $data['trace'];
Expand Down
12 changes: 6 additions & 6 deletions core/classes/core.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1319,7 +1319,7 @@ public static function show_500($msg = null)
(
'project' => Core::$project,
'uri' => HttpIO::$uri,
'url' => HttpIO::PROTOCOL . '://'.$_SERVER['HTTP_HOST'] . $_SERVER["REQUEST_URI"],
'url' => HttpIO::PROTOCOL . $_SERVER['HTTP_HOST'] . $_SERVER["REQUEST_URI"],
'post' => HttpIO::POST(null, HttpIO::PARAM_TYPE_OLDDATA),
'get' => $_SERVER['QUERY_STRING'],
'cookie' => HttpIO::COOKIE(null, HttpIO::PARAM_TYPE_OLDDATA),
Expand All @@ -1340,7 +1340,7 @@ public static function show_500($msg = null)
$trace_array['use_time'] = microtime(1) - START_TIME;
$trace_array['trace'] = $trace_obj;

$trace_data = base64_encode(gzcompress(serialize($trace_array), 9));
$trace_data = serialize($trace_array);
unset($trace_array);

$view->error_saved = true;
Expand Down Expand Up @@ -1372,7 +1372,7 @@ public static function show_500($msg = null)
switch ($save_type)
{
case 'database':
$obj = new Database($error_config['type_config']?$error_config['type_config']:'default');
$obj = $error_config['type_config']?new Database($error_config['type_config']) : new Database();
$data = array
(
'time' => strtotime($date.' 00:00:00'),
Expand All @@ -1383,7 +1383,7 @@ public static function show_500($msg = null)
$obj->insert('error500_log', $data);
break;
case 'cache':
$obj = new Cache($error_config['type_config']?$error_config['type_config']:'default');
$obj = $error_config['type_config']?new Cache($error_config['type_config']) : new Cache();
if (!$obj->get($error_no))
{
$obj->set($error_no, $trace_data, 7*86400);
Expand All @@ -1408,9 +1408,9 @@ public static function show_500($msg = null)
$view->error = $error;
$view->render(true);
}
catch ( Exception $e )
catch (Exception $e)
{
list ( $REQUEST_URI ) = explode('?', $_SERVER['REQUEST_URI'], 2);
list ($REQUEST_URI) = explode('?', $_SERVER['REQUEST_URI'], 2);
$REQUEST_URI = htmlspecialchars(rawurldecode($REQUEST_URI));
echo '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">' .
CRLF . '<html>' .
Expand Down

0 comments on commit 51eb16c

Please sign in to comment.