fileupload.php - error - Array to string conversion

farinacci

Member
Hi all.

PHP 7.2
Fabrik 3.9
Joomla 3.9.1

I have this error:

Array to string conversion in:
../plugins/fabrik_element/fileupload/fileupload.php on line 3111


Ajax upload = YES

Can you help me ?
Grazie
 
hi Hugh,

the problem cam when delete existing file.

PHP Notice: Undefined variable: myFileDir in /var/www/ecops/html/ecops/plugins/fabrik_element/fileupload/fileupload.php on line 2276
Hmm, how recent is your Fabrik install?

The line number you gave me in the error (3111) is in the middle of the onDeleteRows method, only called when you delete row(s) in the list and have elected to delete associated files in the upload element when rows are deleted.

https://github.com/Fabrik/fabrik/blob/master/plugins/fabrik_element/fileupload/fileupload.php#L3111

-- hugh


Hi Hugh,

the error during the deletetion existing file. File not deleting.

PHP Notice: Undefined variable: myFileDir in ../plugins/fabrik_element/fileupload/fileupload.php on line 2276
 
Well, unless someone updates to latest github and gives me a line number for the error(s) which match the existing code, I can't tell you. I'm pretty sure the "undefined variable" for $myFileDir is already fixed. But I have no idea which line the array issue in the OP is coming from, as the line number given is from an older version and doesn't match any existing code.

-- hugh
 
i did get some error yestarday but after change the Error Reporting in the configuration i was able to hide the message,. i try to test it again i just update the lateste github
 
Sorry Hugh for the delay, i change the configuration setting - error reporting to System Defaul and when i try to upload a picture get this error

0 Call to a member function clear() on null


but the new recod and the picture are upload correctly
 
I found the problem, although I don't know how to fix it. When setting the element without aiax it saves the file name as a string in the database while if you set ajax, even if it is a file it only saves as an array.

I hope I was helpful
 
So the solution could be to save in arrays even when uploading a file without ajax, otherwise when it is in the list, if it finds a mix of arrays and strings it does not work
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top