title: Redirect doesn't work in cake 3 when I use copy command before
body: <p>I tried this in cake 3:</p>
  
  <pre><code>$path = '/some/path/on/myserver';
  $dir = new Folder($path, true, 0775);
  copy('https://www.domain.com/image',$path.$imgName);
  return $this-&gt;redirect('redirectPath');
  </code></pre>
  
  <p>$this->redirect doesn't work. But if I command out the copy command redirect works fine. What is the problem or did I miss something?</p>