Page 1 of 1

ERROR: 0 implode(): Argument #2 ($array) must be of type ?array, string given

Posted: 28 Dec 2020, 17:32
by yapanta
Hi, I am in front of a technical problem (see the following error) that I can't manage to. Please if you have any advice, I would appreciated it.

An error has occurred.
0 implode(): Argument #2 ($array) must be of type ?array, string given

I have just installed the latest version of Phoca Gallery (com_phocagallery_v4.3.18), at a completely new joomla installation locally at my PC, through XAAMP s/w. When I choose the Images, Categories or any other icon from the control panel, the above error is occurred.

Thank you in advanced
Yannis

Re: ERROR: 0 implode(): Argument #2 ($array) must be of type ?array, string given

Posted: 28 Dec 2020, 18:52
by christine
Hi Yannis,

Are you using PHP 8?. Try with PHP 7 please x advise. Thanks

Would be useful to enable debug mode and error reporting in Joomla! Configuration.
Error reporting to Maxium. Debug Settings: Yes. To get more information where this problem occurs. So called "Call Stack"

Kind regards
Christine

Re: ERROR: 0 implode(): Argument #2 ($array) must be of type ?array, string given

Posted: 28 Dec 2020, 19:29
by yapanta
Hi Cristine and thank you for your quick response.

Yes my PHP Version is 8.0.0 but I don't know how to install and enable the version 7. Is there any simple way to do it?

I enabled the debug mode too and the following info lines were displayed. Are they help you to understand where the problem is?

Thank you again
Yannis
Call stack
# Function Location
1 () JROOT\administrator\components\com_phocagallery\libraries\phocagallery\render\renderadminviews.php:264
2 implode() JROOT\administrator\components\com_phocagallery\libraries\phocagallery\render\renderadminviews.php:264
3 PhocaGalleryRenderAdminViews->formInputs() JROOT\administrator\components\com_phocagallery\views\phocagallerycs\tmpl\default.php:172
4 include() JROOT\libraries\src\MVC\View\HtmlView.php:701
5 Joomla\CMS\MVC\View\HtmlView->loadTemplate() JROOT\libraries\src\MVC\View\HtmlView.php:230
6 Joomla\CMS\MVC\View\HtmlView->display() JROOT\administrator\components\com_phocagallery\views\phocagallerycs\view.html.php:116
7 PhocaGalleryCpViewPhocaGalleryCs->display() JROOT\libraries\src\MVC\Controller\BaseController.php:672
8 Joomla\CMS\MVC\Controller\BaseController->display() JROOT\administrator\components\com_phocagallery\controller.php:60
9 PhocaGalleryCpController->display() JROOT\libraries\src\MVC\Controller\BaseController.php:710
10 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT\administrator\components\com_phocagallery\phocagallery.php:44
11 require_once() JROOT\libraries\src\Component\ComponentHelper.php:402
12 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT\libraries\src\Component\ComponentHelper.php:377
13 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT\libraries\src\Application\AdministratorApplication.php:101
14 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT\libraries\src\Application\AdministratorApplication.php:159
15 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT\libraries\src\Application\CMSApplication.php:196
16 Joomla\CMS\Application\CMSApplication->execute() JROOT\administrator\index.php:51

Re: ERROR: 0 implode(): Argument #2 ($array) must be of type ?array, string given

Posted: 28 Dec 2020, 20:24
by christine
Hi Yannis,
yapanta wrote: 28 Dec 2020, 19:29 Yes my PHP Version is 8.0.0 but I don't know how to install and enable the version 7. Is there any simple way to do it?

A simple way? Hmmm, I don't use Xampp, but maybe this could help you: https://www.apachefriends.org/download.html
I think e.g. PHP Version 7.3
I enabled the debug mode too and the following info lines were displayed. Are they help you to understand where the problem is?
Thank you for debugging, it's helpful for the developer. I will inform Jan about.

Kind regards
Christine

Re: ERROR: 0 implode(): Argument #2 ($array) must be of type ?array, string given

Posted: 28 Dec 2020, 22:55
by yapanta
Thank you Cristine again. I tried to install PHP 7, but unfortunately it did'nt work.
So, I am looking forward to hearing Jan's advice or instructions now.

By the way, for your information I installed the "Phoca download" and everything went good.
Phoca Gallery is very important to me, just because I have more than 2.500 photos in a previous version of Phoca Gallery which are waiting for migration.
I would appreciate your help.

Thanks
Yannis

Re: ERROR: 0 implode(): Argument #2 ($array) must be of type ?array, string given

Posted: 29 Dec 2020, 13:08
by christine
Hi Yannis,
yapanta wrote: 28 Dec 2020, 22:55 Thank you Cristine again. I tried to install PHP 7, but unfortunately it did'nt work.
Check, if you can change in Xampp to PHP 7.3 or:
So, I am looking forward to hearing Jan's advice or instructions now.
For the moment: If error are not "Fatal errors", you can set error reporting to None.
The message (Call Stack) is a development message & should not have effect on the function.

Actual Phoca Gallery 4.3.18: PHP 7.3
PG 4.4.0 Beta: https://www.phoca.cz/news/1096-phoca-ga ... a-released > ready for PHP 7.4 (for testing purposes only).
Phoca Gallery is very important to me, just because I have more than 2.500 photos in a previous version of Phoca Gallery which are waiting for migration.
What do you mean with migration? Because migration from Version a) to Version b) should be done in this way:
https://www.phoca.cz/documents/50-phoca ... o-joomla-3

but you wrote:
I have just installed the latest version of Phoca Gallery (com_phocagallery_v4.3.18), at a completely new joomla installation locally at my PC
Try, if normal upload procedures etc. are possible.

Kind regards
Christine

Re: ERROR: 0 implode(): Argument #2 ($array) must be of type ?array, string given

Posted: 29 Dec 2020, 14:03
by Jan
Hi, all the "implode"/"explode" functions were checked in 4.4.0 Beta version and fixed. So this will be Ok in 4.4.0 stable.

Jan

Re: ERROR: 0 implode(): Argument #2 ($array) must be of type ?array, string given

Posted: 30 Dec 2020, 18:54
by yapanta
Hi Cristine and Jan and thank you for your info.
Finally, I understand that if I want to use the PG 4.3.18 at this moment, I have to change the PHP from v.8.0 to v.7.3. Correct?
Jan says that in PG 4.4.0 (stable version) everything would be OK with PHP 7.4 not PHP 8.0. Correct?

As far as the migration, I think that I can manage to. If I meet some problem I will check the instructions you sent me.

Thank you again.

Re: ERROR: 0 implode(): Argument #2 ($array) must be of type ?array, string given

Posted: 31 Dec 2020, 18:54
by christine
Hi Yannis,

Thanks for your feedback.
yapanta wrote: 30 Dec 2020, 18:54 Finally, I understand that if I want to use the PG 4.3.18 at this moment, I have to change the PHP from v.8.0 to v.7.3. Correct?
Jan says that in PG 4.4.0 (stable version) everything would be OK with PHP 7.4 not PHP 8.0. Correct?
In principle yes - correct. To avoid such error (Notices) etc. Don't know, which consequences could be, if using PHP 8.0.
As far as the migration, I think that I can manage to. If I meet some problem I will check the instructions you sent me.
Will close now this Thread. For new questions, you can send a new Thread.

We wish you Happy New Year
Christine