mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
修改一处逻辑错误
This commit is contained in:
@@ -40,8 +40,11 @@ class Transform {
|
|||||||
// Transform::jsonDecode('abc', true);
|
// Transform::jsonDecode('abc', true);
|
||||||
static public function __callStatic($method, $params){
|
static public function __callStatic($method, $params){
|
||||||
$type = substr($method, 0, strlen($method) - 6);
|
$type = substr($method, 0, strlen($method) - 6);
|
||||||
$method = substr($method, -6);
|
$method = strtolower(substr($method, -6));
|
||||||
$assoc = empty($params[2]) ? true : false;
|
$assoc = empty($params[2]) ? true : false;
|
||||||
|
if(!in_array($method, ['encode', 'decode'])){
|
||||||
|
throw new Think\Exception("call to undefined method {$method}");
|
||||||
|
}
|
||||||
return self::$method($params[0], $type, $assoc);
|
return self::$method($params[0], $type, $assoc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user