升级到v5128lts
This commit is contained in:
1 parent
a139519dec
commit
dbefa7f320
30 files changed
+184
-117
No files matched your search
@@ -20,7 +20,7 @@ use think\route\Dispatch;
|
||||
*/
|
||||
class App extends Container
|
||||
{
|
||||
const VERSION = '5.1.28 LTS';
|
||||
const VERSION = '5.1.29 LTS';
|
||||
|
||||
/**
|
||||
* 当前模块路径
|
||||
|
||||
@@ -187,7 +187,7 @@ class Config implements \ArrayAccess
|
||||
*/
|
||||
public function has($name)
|
||||
{
|
||||
if (!strpos($name, '.')) {
|
||||
if (false === strpos($name, '.')) {
|
||||
$name = $this->prefix . '.' . $name;
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ class Config implements \ArrayAccess
|
||||
*/
|
||||
public function get($name = null, $default = null)
|
||||
{
|
||||
if ($name && !strpos($name, '.')) {
|
||||
if ($name && false === strpos($name, '.')) {
|
||||
$name = $this->prefix . '.' . $name;
|
||||
}
|
||||
|
||||
@@ -272,7 +272,7 @@ class Config implements \ArrayAccess
|
||||
public function set($name, $value = null)
|
||||
{
|
||||
if (is_string($name)) {
|
||||
if (!strpos($name, '.')) {
|
||||
if (false === strpos($name, '.')) {
|
||||
$name = $this->prefix . '.' . $name;
|
||||
}
|
||||
|
||||
@@ -314,7 +314,7 @@ class Config implements \ArrayAccess
|
||||
*/
|
||||
public function remove($name)
|
||||
{
|
||||
if (!strpos($name, '.')) {
|
||||
if (false === strpos($name, '.')) {
|
||||
$name = $this->prefix . '.' . $name;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ class Env
|
||||
* @param mixed $default 默认值
|
||||
* @return mixed
|
||||
*/
|
||||
public function get($name = null, $default = null)
|
||||
public function get($name = null, $default = null, $php_prefix = true)
|
||||
{
|
||||
if (is_null($name)) {
|
||||
return $this->data;
|
||||
@@ -55,12 +55,16 @@ class Env
|
||||
return $this->data[$name];
|
||||
}
|
||||
|
||||
return $this->getEnv($name, $default);
|
||||
return $this->getEnv($name, $default, $php_prefix);
|
||||
}
|
||||
|
||||
protected function getEnv($name, $default = null)
|
||||
protected function getEnv($name, $default = null, $php_prefix = true)
|
||||
{
|
||||
$result = getenv('PHP_' . $name);
|
||||
if ($php_prefix) {
|
||||
$name = 'PHP_' . $name;
|
||||
}
|
||||
|
||||
$result = getenv($name);
|
||||
|
||||
if (false === $result) {
|
||||
return $default;
|
||||
|
||||
Loaded 3 of 30 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user