- Remove ob_end_clean().
This commit is contained in:
@@ -250,6 +250,7 @@ define('TABLE_COMPANY', '`' . $config->db->prefix . 'company`');
|
||||
define('TABLE_DEPT', '`' . $config->db->prefix . 'dept`');
|
||||
define('TABLE_CONFIG', '`' . $config->db->prefix . 'config`');
|
||||
define('TABLE_USER', '`' . $config->db->prefix . 'user`');
|
||||
define('TABLE_SESSION', '`' . $config->db->prefix . 'session`');
|
||||
define('TABLE_TODO', '`' . $config->db->prefix . 'todo`');
|
||||
define('TABLE_GROUP', '`' . $config->db->prefix . 'group`');
|
||||
define('TABLE_GROUPPRIV', '`' . $config->db->prefix . 'grouppriv`');
|
||||
|
||||
@@ -101,3 +101,11 @@ CREATE TABLE IF NOT EXISTS `zt_solution` (
|
||||
`updatedDate` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `zt_session` (
|
||||
`id` varchar(32) NOT NULL,
|
||||
`data` mediumtext,
|
||||
`timestamp` int(10) unsigned DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `timestamp` (`timestamp`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
@@ -1074,8 +1074,9 @@ class baseControl
|
||||
return print($response);
|
||||
}
|
||||
|
||||
$obLevel = ob_get_level();
|
||||
for($i = 0; $i < $obLevel; $i++) ob_end_clean();
|
||||
/* Zand will use ob_get_clean() to print, so cannot clean so early. */
|
||||
// $obLevel = ob_get_level();
|
||||
// for($i = 0; $i < $obLevel; $i++) ob_end_clean();
|
||||
|
||||
$response = helper::removeUTF8Bom(urldecode(json_encode($data)));
|
||||
$this->app->outputXhprof();
|
||||
|
||||
@@ -795,7 +795,7 @@ class baseRouter
|
||||
$xhprofRuns = new \XHProfRuns_Default($outputDir);
|
||||
$type = "{$this->moduleName}_{$this->methodName}";
|
||||
$runID = $xhprofRuns->save_run($log, $type);
|
||||
if(!headers_sent()) header("Xhprof-RunID: {$runID}");
|
||||
if(!headers_sent()) helper::header('Xhprof-RunID', $runID);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1336,7 +1336,8 @@ class baseRouter
|
||||
{
|
||||
if(str_starts_with($_SERVER['REQUEST_URI'], '/data/upload') && !is_file($this->wwwRoot . $_SERVER['REQUEST_URI']))
|
||||
{
|
||||
header("HTTP/1.1 404 Not Found", true, 404);
|
||||
helper::setStatus(404);
|
||||
helper::end();
|
||||
}
|
||||
|
||||
if($this->config->requestType == 'PATH_INFO' or $this->config->requestType == 'PATH_INFO2')
|
||||
@@ -2237,7 +2238,7 @@ class baseRouter
|
||||
$url .= (str_contains($url, '?') ? '&' : '?') . $this->config->sessionVar . '=' . session_id() . '&account=' . $_SESSION['user']->account;
|
||||
if($extension == '302')
|
||||
{
|
||||
header("location: $url");
|
||||
helper::header('location', $url);
|
||||
helper::end();
|
||||
}
|
||||
|
||||
@@ -2900,7 +2901,7 @@ class baseRouter
|
||||
if(empty($message))
|
||||
{
|
||||
/* Try to repair table. */
|
||||
header("location: {$this->config->webRoot}checktable.php");
|
||||
helper::header('location', "{$this->config->webRoot}checktable.php");
|
||||
helper::end();
|
||||
}
|
||||
static::triggerError($message, __FILE__, __LINE__, true);
|
||||
|
||||
@@ -158,7 +158,6 @@ class wg
|
||||
|
||||
$rawContent = ob_get_contents();
|
||||
if(!is_string($rawContent)) $rawContent = '';
|
||||
ob_end_clean();
|
||||
|
||||
if(is_object($result))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user