Page 1 of 1

Uploading Learning objects

Posted: Thu Aug 20, 2020 3:13 pm
by JosiahIsaack
Hello,

I'm getting the following error when trying to upload a file with .pdf extension

( ! ) Fatal error: Uncaught ArgumentCountError: Too few arguments to function sl_upload(), 2 passed in C:\wamp64\www\forma\appLms\modules\item\item.php on line 74 and exactly 3 expected in C:\wamp64\www\forma\lib\lib.upload.php on line 74
( ! ) ArgumentCountError: Too few arguments to function sl_upload(), 2 passed in C:\wamp64\www\forma\appLms\modules\item\item.php on line 74 and exactly 3 expected in C:\wamp64\www\forma\lib\lib.upload.php on line 74


line 74 of lib.upload.php is as follows: function sl_upload( $srcFile, $dstFile, $file_ext) {
$uploadType = Get::cfg('uploadType', null);


kindly assist me to get rid of the error.

Re: Uploading Learning objects

Posted: Thu Aug 20, 2020 4:17 pm
by alfa24
Search before ask.
This bug has been asked many times and solved.

Re: Uploading Learning objects

Posted: Sat Aug 22, 2020 12:28 pm
by JosiahIsaack
Hey alfa24,

I asked because i couldn't find the solution even after searching.None of the topics i checked matched the one above. If you have access to the solution, i'll be glad if you share.

Re: Uploading Learning objects

Posted: Sat Aug 22, 2020 1:00 pm
by alfa24

Re: Uploading Learning objects

Posted: Fri Oct 09, 2020 7:10 pm
by Haksee
Rather saying the solution exists some one should translate the page in English

Re: Uploading Learning objects

Posted: Fri Oct 09, 2020 8:16 pm
by alfa24
In my post there's almost nothing to translate.
Anyway, what's the matter with your browser translation functionalities?

Re: Uploading Learning objects

Posted: Sun Oct 11, 2020 7:51 am
by Haksee
My translating options are fine but my browser is not intelligent enough to translate then search the translation.

Re: Uploading Learning objects

Posted: Sun Oct 11, 2020 9:56 am
by max
Haksee wrote: Fri Oct 09, 2020 7:10 pm Rather saying the solution exists some one should translate the page in English
This forum is both in Italian and in English. That issue has been addressed and explained probably in both languages.

Anyway, the issue is probably that your php version is higher than the recommended 7.0.

Even if it isn't so, the solution has been posted in the thread linked by alfa24. I am pasting the appropriated screenshot and translating it for you

in /lib/lib.upload.php
replace

(code)

with

(code)

Re: Uploading Learning objects

Posted: Sun Oct 11, 2020 6:17 pm
by Haksee
Thanks