What does this mean?

dynamicadv 24 Jan, 2008
Warning: reset() [function.reset]: Passed variable is not an array or object in /home/dynamif2/public_html/financialriskmgmt.com/includes/joomla.php on line 3992

Warning: Variable passed to each() is not an array or object in /home/dynamif2/public_html/financialriskmgmt.com/includes/joomla.php on line 3994
GreyHead 24 Jan, 2008
Hi dynamicadv,

Those lines appear to be dealing with email attachments and something isn't quite OK.

Please put this code in 'OnSubmit after email' turn on debug and post the results here:
<?php
if ($debug) {
  echo "attachments: "; print_r($attachments); echo "<br />";
}
?>
Bob

Post edited by: GreyHead, at: 2008/01/24 00:54<br><br>Post edited by: GreyHead, at: 2008/01/25 10:58
dynamicadv 24 Jan, 2008
Ok - I did that and here is what came up...

_POST: Array ( [Name] => Darrel [Address] => Here [Phone] => 5551212 [Time_to_call] => now [checkbox] => 2nd Opinion Yes [Avoid_Excessive_Tax_Yes] => Avoid Excessive Tax Yes [Avoid_Excessive_Tax_Yes2] => start making money Yes [Avoid_Excessive_Tax_Yes3] => fixed index annuities Yes [Avoid_Excessive_Tax_Yes4] => retirement Yes [Avoid_Excessive_Tax_Yes5] => estate planning Yes [Avoid_Excessive_Tax_Yes6] => living trust_will yes [Avoid_Excessive_Tax_Yes7] => life insurance Yes [Avoid_Excessive_Tax_Yes8] => Long term care insurance yes [Avoid_Excessive_Tax_Yes9] => Dinner Yes [button] => Submit )
Case 1: Use table layout
E-mail: 'Yes' custom

Warning: reset() [function.reset]: Passed variable is not an array or object in /home/dynamif2/public_html/financialriskmgmt.com/includes/joomla.php on line 3992

Warning: Variable passed to each() is not an array or object in /home/dynamif2/public_html/financialriskmgmt.com/includes/joomla.php on line 3994
Email not sent
E-mail message

From: Administrator [info@financialriskmgmt.com]
To: [email]info@financialriskmgmt.com[/email]
Subject: Website Form Submission
Name Darrel
Address Here
Phone 5551212
Time to call
checkbox 2nd Opinion Yes
Avoid Excessive Tax Yes
Avoid Excessive Tax Yes2
Avoid Excessive Tax Yes3
Avoid Excessive Tax Yes4
Avoid Excessive Tax Yes5
Avoid Excessive Tax Yes6
Avoid Excessive Tax Yes7
Avoid Excessive Tax Yes8
Avoid Excessive Tax Yes9
button Submit


Submitted by 71.119.166.90
attachments: Array ( )


Thanks for your help on this!
dynamicadv 24 Jan, 2008
One more thing - I noticed I had some fields labeled wrong, so I changed the code and re did the app. The form went rhough, but here is what the screen said:

POST: Array ( [Name] => Darrel [Address] => 123 Any Street [Phone] => 5551212 [Time_to_call] => now [checkbox] => 2nd Opinion Yes [retirement_Yes] => retirement Yes [Dinner_Yes] => Dinner Yes [button] => Submit )
Case 1: Use table layout
E-mail: 'Yes' custom

Warning: reset() [function.reset]: Passed variable is not an array or object in /home/dynamif2/public_html/financialriskmgmt.com/includes/joomla.php on line 3992

Warning: Variable passed to each() is not an array or object in /home/dynamif2/public_html/financialriskmgmt.com/includes/joomla.php on line 3994
Email sent
E-mail message

From: Administrator [info@financialriskmgmt.com]
To: [email]info@financialriskmgmt.com[/email]
Subject: Website Form Submission
Name Darrel
Address 123 Any Street
Phone 5551212
Time to call
checkbox 2nd Opinion Yes
Avoid Excessive Tax Yes
start making money Yes
fixed index annuities Yes
retirement Yes
estate planning Yes
living trust_will yes
life insurance Yes
Long term care insurance yes
Dinner Yes
button Submit


Submitted by 71.119.166.90
attachments: Array ( )


Like I said though - I got the test email in my mailbox.
GreyHead 25 Jan, 2008
Hi dynamicadv,

It's that Attachments: Array() that's the problem, the empty array is setting off a PHP Warning which is a nuisance rather than a disaster.

Do you have a file upload in your form? If so then something may be going wrong with that. Perhaps we need another check in the code so that empty file arrays aren't sent.

Meanwhile you can probably get rid of the error message by setting your site Error Reporting to 'System Default' in Global Configuration | Server.

Bob
dynamicadv 25 Jan, 2008
Ok - I scrapped the problem form and started from scratch. I don't get the errors anymore, but now my form isn't completely sending all the data. Is it something in my HTML? Or the way I have ChronoForm set up?
GreyHead 25 Jan, 2008
Hi dynamicadv,

my form isn't completely sending all the data

Sorry, my mindreading isn't working this morning. I need more info that that. What data isn't uploading and what's the html . . .

. . . better still Take a Form backup from the Forms Manager and either post it here or email it to me at the address in my sig so I can look at all the settings.

Bob
dynamicadv 25 Jan, 2008
I just sent you an email. Thanks a lot for all your help!
GreyHead 26 Jan, 2008
Hi dynamicadv,

I think that the problem is just the the checkbox fields need to have name=checkbox[] - without the [] to put the results into an array you only get the last (first?) field value.

Bob
jcrespo 11 Feb, 2008
I had the same problem but then I added a "reply to name" in the general tab and the error disappeared. I hope this helps.
This topic is locked and no more replies can be posted.