Closed kiwi3685 closed 5 years ago
I use kcfinder in one of my open source projects. If you are still interested in this script I can provide you a version of kcfinder where I fixed your issue and additionally fixed an error where drag and drop a file creates duplicates.
Thanks. Your version sounds like it will be useful - although as a temporary fix I removed the lines causing the error, with no ill-effect! But a correct fix would be better :-)
Here is a reimplementation of the deprecated each() function
function myEach(&$arr) {
$key = key($arr);
$result = ($key === null) ? false : [$key, current($arr), 'key' => $key, 'value' => current($arr)];
next($arr);
return $result;
}
Just add this method to kcfinder and replace any calls of each() with myEach(). This will fix the deprecaton warnings.
Thanks
If you are still interested in ... additionally fixed an error where drag and drop a file creates duplicates.
Hi! I am sorry if offtopic. Could you please provide this part of script?
@IVoyt I noticed that my current fix works only if the user don't create a new folder. After the user created a new folder in kcfinder the duplicates error still happens. Are you nevertheless interested in my fix?
If i got the time to look at this, i can fix the other part of the duplicates issue too and provide it as a fork at GitHub.
@IVoyt I noticed that my current fix works only if the user don't create a new folder. After the user created a new folder in kcfinder the duplicates error still happens. Are you nevertheless interested in my fix?
If i got the time to look at this, i can fix the other part of the duplicates issue too and provide it as a fork at GitHub.
Yes, that would be great!
@IVoyt here is a link to my quick fixed script. https://github.com/derUli/ulicms/blob/master/ulicms/admin/kcfinder/js/110.dropUpload.js
I currently try to figure out, why the error still happens after creating a new folder.
@derUli thanks a lot!
Two lines in the file \lib\class_image.php contain the function each() which is deprecated in PHP 7.2
Is this likely to be fixed, or is this project now officially dead?