[SOLVED] [php 8] [fieldtype "file"] error: implode(): Argument #2 ($array) must be of type ?array, string given

More
2 years 1 month ago - 2 years 1 month ago #82961 by kath
Hi there,

I'm updating a site to php 8, and get this error:

implode(): Argument #2 ($array) must be of type ?array, string given
and a blank screen, even with debug on and error reporting max.

The error arises when I do

~ FlexicontentFields::getFieldDisplay($item, 'downloads');
where
$item
is a correct item object (other fields work)
and
'downloads'
is the correct field name/alias

What can I do to make that go away?
Thanks!

[edit]
php 8.1.10
Joomla! 3.10.11
FC 4.1.3
Last edit: 2 years 1 month ago by kath.

Please Log in or Create an account to join the conversation.

More
2 years 1 month ago #82962 by kath
Solved it, sorry to post too early:

If you come across this error, too, check for file overrides in your custom template. In my case it was
C:\xampp\htdocs\[...]\templates\[...]\html\flexicontent_fields\file

in there I had a modified copy of FC's core file that contained old php with
3x
implode( array, seperator )

above param order is now obsolete, switching the param order in each implode() will fix the error.

 

Please Log in or Create an account to join the conversation.

More
2 years 1 month ago #82965 by micker
thanks for return strange to use override in template folder ...

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.338 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline