Try replacing:

sl_upload($_FILES['quest']['tmp_name'][$this->id], $path.$savefile)


sl_upload($_FILES['quest']['tmp_name'][$this->id], $path.$savefile, null);

Explanation: the sl_upload function is expecting 3 arguments, and you’re passing only 2.

Before PHP 7.1, this only triggered a warning, but since then it’s generating a Fatal Error instead.

Since it worked fine for you before (although, it must have triggered a Warning, which probably got logged somewhere unless your error_reporting is very lax), passing null as the third argument should produce the same outcome as it used to.

It would, however, be a better idea to figure out what that function argument is supposed to be used for, as it’s marked as required (no default value).

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top