Skip to content

Commit

Permalink
Merge pull request #51 from wonder-game/develop
Browse files Browse the repository at this point in the history
fix: 修复后台顶级菜单问题
  • Loading branch information
linkunyuan authored Sep 11, 2023
2 parents 2e46f5b + 87b69ba commit 4d8bbd0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Common/Classes/Tree.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public function treeData()
}

foreach ($tree as $item) {
if ($item[$this->pidKey] == 0) { // todo 处理rootId
if (isset($item[$this->pidKey]) && $item[$this->pidKey] == 0) { // todo 处理rootId
$this->tree[] = $item;
}
}
Expand Down
1 change: 1 addition & 0 deletions src/Common/OrmCache/SplArray.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ protected function _getSplArray()
*/
public function cacheSpl($key = null, $default = null)
{
/* @var \EasySwoole\Spl\SplArray $Spl */
$Spl = RedisPool::invoke(function (Redis $redis) {
$key = $this->_getCacheKey();

Expand Down
15 changes: 7 additions & 8 deletions src/function.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
if ( ! function_exists('is_super')) {
/**
* 是否超级管理员
* @param $rid
* @param int $rid
* @return bool
*/
function is_super($rid = null)
Expand All @@ -37,8 +37,8 @@ function is_super($rid = null)

if ( ! function_exists('find_model')) {
/**
* @param $name
* @param $throw
* @param string $name
* @param bool $throw
* @return string|null
* @throws Exception
*/
Expand Down Expand Up @@ -728,8 +728,8 @@ function sysinfo($key = null, $default = null)
if ( ! function_exists('array_merge_decode')) {
/**
* array_merge_decode
* @param $array
* @param $merge
* @param array $array
* @param array $merge
* @return array
*/
function array_merge_decode($array, $merge = [])
Expand Down Expand Up @@ -788,7 +788,7 @@ function is_module($name = 'log')
if ( ! function_exists('memory_convert')) {
/**
* 转换内存单位
* @param $bytes
* @param numeric $bytes
* @return string
*/
function memory_convert($bytes)
Expand Down Expand Up @@ -819,7 +819,7 @@ function json_decode_ext($data = '')

/**
* Google服务账号文件路径
* @param $pkgbnd
* @param string $pkgbnd
* @return string
*/
function get_google_service_account($pkgbnd)
Expand Down Expand Up @@ -905,7 +905,6 @@ function sign($data, $sign = null, $key = '')
}

if ( ! function_exists('report_redis_key')) {

/**
* 返回上报队列里的redis-key
* @param string $key 具体动作 或 归类.具体动作
Expand Down

0 comments on commit 4d8bbd0

Please sign in to comment.