Skip to content

Commit 4f14bab

Browse files
committed
I方法的filter参数改进
调用Action类的_get _post等方法将导致一个警告错误
1 parent 1c9f4e5 commit 4f14bab

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

ThinkPHP/Common/common.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* @param mixed $filter 参数过滤方法
3030
* @return mixed
3131
*/
32-
function I($name,$default='',$filter='') {
32+
function I($name,$default='',$filter=null) {
3333
if(strpos($name,'.')) { // 指定参数来源
3434
list($method,$name) = explode('.',$name);
3535
}else{ // 默认为自动判断

ThinkPHP/Lib/Core/Action.class.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ public function __call($method,$args) {
257257
}else{ // 变量默认值
258258
$data = isset($args[2])?$args[2]:NULL;
259259
}
260+
Log::record('建议使用I方法替代'.$method,Log::NOTICE);
260261
return $data;
261262
}
262263
}

0 commit comments

Comments
 (0)