(2023-02-01, 06:20:24)tuxy Wrote: I added an image-field with the I18N Custom Fields plugin to my pages.
When click on the [browse] button, the file-manager pops-up, but the image-files are not shows up.
For testing: In the default editor, the tool [image] works the file-browser perfect.
When enable debug-mode, this error shows in the filebrowser:
[font=Arial, "Helvetica Neue", Helvetica, sans-serif]Fatal error[/font][font=Arial, "Helvetica Neue", Helvetica, sans-serif]: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /domains/webkust.be/public_html/gscms/plugins/i18n_customfields/browser/filebrowser.php:105 Stack trace: #0 {main} thrown in [/font][font=Arial, "Helvetica Neue", Helvetica, sans-serif]/domains/webkust.be/public_html/gscms/plugins/i18n_customfields/browser/filebrowser.php[/font][font=Arial, "Helvetica Neue", Helvetica, sans-serif] on line [/font][font=Arial, "Helvetica Neue", Helvetica, sans-serif]105[/font]
Someone have also this issue? How can i solve this?
Found it!
Change the code in line 105 in the file ../plugins/i18n_customfields/browser/filebrowser.php :
change this code:
Code:
if (count($dirsSorted) != 0) {
with this code:
Code:
if (count((array)$dirsSorted) != 0) {