diff --git a/base.php b/base.php
index 052febe7..7ab5a9ab 100644
--- a/base.php
+++ b/base.php
@@ -44,9 +44,11 @@ require CORE_PATH . 'Loader.php';
if (is_file(ROOT_PATH . 'env' . EXT)) {
$env = include ROOT_PATH . 'env' . EXT;
foreach ($env as $key => $val) {
- $name = ENV_PREFIX . $key;
+ $name = ENV_PREFIX . strtoupper($key);
if (is_bool($val)) {
$val = $val ? 1 : 0;
+ } elseif (!is_scalar($val)) {
+ continue;
}
putenv("$name=$val");
}
diff --git a/library/think/App.php b/library/think/App.php
index 9865d1d3..f03c31f8 100644
--- a/library/think/App.php
+++ b/library/think/App.php
@@ -352,9 +352,12 @@ class App
} else {
//重新申请一块比较大的buffer
if (ob_get_level() > 0) {
- ob_end_clean();
+ $output = ob_get_clean();
}
ob_start();
+ if (!empty($output)) {
+ echo $output;
+ }
}
// 应用命名空间
diff --git a/library/think/Config.php b/library/think/Config.php
index 330e57f1..105920b1 100644
--- a/library/think/Config.php
+++ b/library/think/Config.php
@@ -81,7 +81,7 @@ class Config
if (!strpos($name, '.')) {
// 判断环境变量
- $result = getenv(ENV_PREFIX . $name);
+ $result = getenv(ENV_PREFIX . strtoupper($name));
if (false !== $result) {
return $result;
}
@@ -89,7 +89,7 @@ class Config
} else {
// 二维数组设置和获取支持
$name = explode('.', $name);
- $result = getenv(ENV_PREFIX . $name[0] . '_' . $name[1]);
+ $result = getenv(ENV_PREFIX . strtoupper($name[0] . '_' . $name[1]));
// 判断环境变量
if (false !== $result) {
return $result;
@@ -113,7 +113,7 @@ class Config
}
if (!strpos($name, '.')) {
- $result = getenv(ENV_PREFIX . $name);
+ $result = getenv(ENV_PREFIX . strtoupper($name));
if (false !== $result) {
return $result;
}
@@ -122,7 +122,7 @@ class Config
} else {
// 二维数组设置和获取支持
$name = explode('.', $name);
- $result = getenv(ENV_PREFIX . $name[0] . '_' . $name[1]);
+ $result = getenv(ENV_PREFIX . strtoupper($name[0] . '_' . $name[1]));
// 判断环境变量
if (false !== $result) {
return $result;
diff --git a/tpl/think_exception.tpl b/tpl/think_exception.tpl
index aabf82a8..a978f1de 100644
--- a/tpl/think_exception.tpl
+++ b/tpl/think_exception.tpl
@@ -83,11 +83,11 @@