Warning implode on old J1 (2.3.9)

hcethatsme 03 Nov, 2009
I know I need to transition to J1.5... it's just a huge project and our staff time is being cut. :*( So I'll understand if you can't help me. The form is working correctly, it's just giving the warning when the results page displays. Here is the form:
http://www.susqcolibrary.org/index.php?option=com_chronocontact&chronoformname=2010_books
and this is the warning:
Warning: implode() [function.implode]: Invalid arguments passed in /home/susqcoli/public_html/components/com_chronocontact/chronocontact.php(546) : eval()'d code on line 7

I searched the forums and found someone else with this error where the response not to use square brackets in the field names. I did have name="join[]" originally (not sure why, this was copied from a previous form) and I fixed that, but I'm still getting the error. It would be great if someone were willing to take a look! (If you're testing, please put "test" as the name so I don't count it as a real vote. Thank you!)

Hilary
GreyHead 03 Nov, 2009
Hi Hilary,

I don't see any obvious reason for it. If you take a backup copy of the form (can you do that in the version you have) I'll take a look.

Meanwhile if you set Error Reporting to System Default, Simple, or None in the Site Global Configuration panel you can probably hide the error. This is a system setting and different settings seem to give different results so you may need to experiement a little.

Bob

PS Do you know LibraryThing.com ?
hcethatsme 03 Nov, 2009
Thank you, Bob! It's attached. Great tip on the warning, I'll do that. Yes, I do know about LibraryThing--listed us there ages ago but I haven't been back often (in fact, I just updated our book sale record, thanks!)

Hilary
GreyHead 03 Nov, 2009
Hi Hilary,

I get a similar error when the Join checkbox isn't checked. That seems to come from this line in the Autogenerated code
	$_POST['join'] = implode(',', $_POST['join']);
The value of $_POST['join'] is either 'yes' or '' but not an array.

I think you can just comment the line out - if you do the error message goes away too.

Bob
hcethatsme 03 Nov, 2009
Aha, that makes perfect sense. Because there were the square brackets initially, the auto-generate treated it like an array, but it's not. I commented out the line and all is copacetic. Thank you SO MUCH, Bob! I love love love Chronoforms.

Hilary
GreyHead 03 Nov, 2009
Hi Hilary,

That makes sense. You do need an array name if you have a check-box group that can return several results. With a single check-box it's not needed.

Bob
This topic is locked and no more replies can be posted.