Category image selection with PHP 8
When we try to select own image as category icon, there appear following error in the image selection modal when PHP 8 is used:
- 0 method_exists(): Argument #1 (closed) ($object_or_class) must be of type object|string, array given
- Call stack
-
- 1 () JROOT/components/com_sobipro/lib/views/view.php:691
- 2 method_exists() JROOT/components/com_sobipro/lib/views/view.php:691
- 3 SPFrontView->get() JROOT/components/com_sobipro/lib/views/view.php:623
- 4 SPFrontView->show() JROOT/components/com_sobipro/views/tpl/icon.php:56
- 5 include() JROOT/components/com_sobipro/lib/views/category.php:66
- 6 SPCategoryView->icon() JROOT/components/com_sobipro/lib/ctrl/category.php:151
- 7 SPCategoryCtrl->iconChooser() JROOT/components/com_sobipro/lib/ctrl/category.php:62
- 8 SPCategoryCtrl->execute() JROOT/components/com_sobipro/lib/ctrl/adm/category.php:122
- 9 SPCategoryAdmCtrl->execute() JROOT/components/com_sobipro/lib/ctrl/adm/sobipro.php:458
- 10 SobiProAdmCtrl->execute() JROOT/administrator/components/com_sobipro/sobipro.php:57
- 11 require_once() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:69
- 12 Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher{closure}() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
- 13 Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:389
- 14 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:143
- 15 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:186
- 16 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:278
- 17 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/includes/app.php:63
- 18 require_once() JROOT/administrator/index.php:32