Closed AllARTSoftworks closed 2 years ago
Because https://github.com/wintercms/winter/blob/3be17f520b84bc7b22f3ea1435b030483fcaf3a0/modules/backend/widgets/MediaManager.php#L355 expects array
as return type of function but the https://github.com/wintercms/winter/blob/3be17f520b84bc7b22f3ea1435b030483fcaf3a0/modules/backend/widgets/MediaManager.php#L367 looks like return only string of partial content.
So either return type of function should be changed (most likely) to string or mixed, or returned data structure.
@arvislacis you are correct, the return type should be changed to string. Would you like to submit a PR to fix that for us?
@LukeTowers Done in https://github.com/wintercms/winter/pull/632
Winter CMS Build
1.2
PHP Version
8.1
Database engine
MySQL/MariaDB
Plugins installed
Winter.Demo, Winter.Translate, Marcomessa.Vite, Utopigs.Seo, Winter.Pages, Excodus.TranslateExtended
Issue description
When trying to rename a folder in media manager a popup with this text shows up:
"Backend\Widgets\MediaManager::onLoadRenamePopup(): Return value must be of type array, string returned" on line 367 of [path]/modules/backend/Widgets/MediaManager.php
Steps to replicate
Go to Media Manager, hover on folder, click on the right icon to open popup
Workaround
No response