We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23383
    • 138 Posts
    Hello,

    I made a snippet who uploads files but when i upload files on a 555 chmoded folder, I’d like to return an error on the frontend.
    Here is my code :
    if(!@move_uploaded_file($_FILES['Filedata']['tmp_name'],basename($_FILES['Filedata']['name']))){
    $this->logUploadError();
    }
    

    My problem is : When the move_upload_file fails (’cause I can’t write in the folder) I see in my modx error log the Parser error, but the fonction I’ve made ($this->logUploadError();) isn’t executed. Is there a way to make this possible?