非法字符串偏移 'tmp_name' cakephp3

Illegal string offset 'tmp_name' cakephp3

我有一个大问题,我无法在cakephp中上传文件,我有一个错误:

 if(!empty($this->request->data['Pictures']['name'])){
            $foto_name=$this->request->data['Pictures']['name'];

            $foto_tmp = $this->request->data['Pictures']['name']['tmp_name'];
            $path=WWW_ROOT.'img'.DS.'myimage'.$foto_name;
            move_uploaded_file($foto_tmp, $path);


        }

错误是:

Warning (2): Illegal string offset 'tmp_name' 

我不明白为什么?

仅使用

$temp_name = $this->request->data['Pictures']['tmp_name'];