发布一个tp v5.1.17 的BUG

浏览:405 发布日期:2018/06/23 分类:ThinkPHP5专区 关键字: bug
不知道是不是bug,处理方法是全部转换为小写了

/**
* 获取当前的控制器名
* @access public
* @param bool $convert 转换为小写
* @return string
*/
public function controller($convert = false)
{
$name = $this->controller ?: '';
return $convert ? strtolower($name) : $name;
}

/**
* 获取当前的操作名
* @access public
* @param bool $convert 转换为驼峰
* @return string
*/
public function action($convert = false)
{
$name = $this->action ?: '';
return $convert ? $name : strtolower($name); // 代码在这里出错了,以前写的大写驼峰法方法,现在全部要把大写转小写,真心无语,每个版本的更新都会有惊喜
}


最佳答案
评论( 相关
后面还有条评论,点击查看>>