title: move_uploaded_file won't work?
body: <p>I got a serious problem for some reasons,
  My function move_uploaded_file won't work, and don't return an error (surrounded by a try catch, and no error in phplog)</p>
  
  <p>I already visit a lot of google links about that, didn't saw anything that could help me, debugged all lines of the code, and can't see any errors.. So I go to you, if you could hellp me !</p>
  
  <p>Thanks a lot!!</p>
  
  <pre><code>if(isset($_FILES['avatar']) &amp;&amp; !empty($_FILES['avatar']['name']))
          {
              $maxSize = 512000; // 50 Ko
              $validesExt = array('jpg', 'jpeg', 'png'); // Only jpg, jpeg or png
  
              if($_FILES['avatar']['size'] &lt;= $maxSize)
              {
                  $extUpload = strtolower(substr(strrchr($_FILES['avatar']['name'], '.'), 1)); // Get extension
                  if(in_array($extUpload, $validesExt))
                  {
                      $path = asset('boostpanel_assets/img/avatars/' . $_SESSION['user']['id'].".".$extUpload); // Upload the avatar
                      try {
                          $dep = move_uploaded_file($_FILES['avatar']['tmp_name'], $path); // move the file to the folder
                          if ($dep) {
                              $db-&gt;update('users', $_SESSION['user']['id'], 'id', [
                                  'avatar' =&gt; $_SESSION['user']['id']
                              ]);
                          }
                      } catch (\Exception $e) {
                          die($e-&gt;getMessage());
                          $status = 'error';
                          $message = 'Oops! Something went wrong.';
                          return $this-&gt;redirect-&gt;route('profile')-&gt;with($status, $message);
                      }
                  }else{
                      $status = 'error';
                      $message = 'This extension is not valid, only jpg, jpeg or png';
                      return $this-&gt;redirect-&gt;route('profile')-&gt;with($status, $message);
                  }
              }else{
                  $status = 'error';
                  $message = 'Your avatar is too big.';
                  return $this-&gt;redirect-&gt;route('profile')-&gt;with($status, $message);
              }
          }
  </code></pre>