cforms II User Forum

Registration is currently disabled.
Guest

FAQs

Login form protected by Login LockDown.


Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

    

Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
Errors when not uploading a file
March 2, 2012
10:53 am
T-K
Guest

I have a 3 step Multi-page form, with an optional upload box. If i upload a file everything is fine, but if no files are uplaoded, i get the following errors. I really hope someone can help with this.

 

(site-name removed)

Warning: array_keys() expects parameter 1 to be array, null given in /var/www/REMOVED/public_html/wp-content/plugins/cforms/lib_nonajax.php on line 354

Warning: Invalid argument supplied for foreach() in /var/www/REMOVED/public_html/wp-content/plugins/cforms/lib_nonajax.php on line 354

Warning: array_keys() expects parameter 1 to be array, null given in /var/www/REMOVED/public_html/wp-content/plugins/cforms/lib_nonajax.php on line 448

Warning: Invalid argument supplied for foreach() in /var/www/REMOVED/public_html/wp-content/plugins/cforms/lib_nonajax.php on line 448

March 3, 2012
11:09 am
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

Odd. I can't replicate that and it doesn't make any sense, because in order to get to that line, it needs to pass this:

 
if( $ongoingSession=='0' && is_array($_SESSION['cforms']['upload']) ){…
 

which only gets set when there is in fact an upload field being used.

 

On what page is your upload field, does it matter if you place it in a different form of the three?

March 4, 2012
2:24 pm
T-K
Guest

The upload field is at page 2. Actually i got 3 upload fields on that page. I tried to remove 2 of them but it didn't change anything.

It made no difference when i moved it to page 1 or 3, same errors.

March 4, 2012
7:19 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

What version of WP and cforms are you using?

March 4, 2012
8:27 pm
T-K
Guest

Oliver said:

What version of WP and cforms are you using?

Wordpress 3.3.1

Cforms Version v13.2.2

March 6, 2012
7:26 pm
T-K
Guest

Hmm… It works fine on single-page forms. But still not working on multi-pages

March 7, 2012
6:51 am
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

I sent you a beta release to try.

Other than that, I haven't heard of anyone else running into this, nor can I replicate.

March 22, 2012
12:05 pm
GASPAR
Guest

I have the same problem.

 

Are there any solution?

 

Wordpres 3.3.1

cformsII 14.0

 

Thanxs

March 28, 2012
1:19 pm
Sebast1an
Guest

Hello there,

 

I have the same problem with multi page forms (2 steps), too.

 

Interesting fact: I cannot reproduce the error. It comes and goes.

Sometimes, filling out a multi-form with parameters for field 1, 3, etc. generates the error after clicking the send button.

When I fill out the form again, no error occurs.

For both cases (error and no error) e-mail sending works correctly. I wasn't able to test if also uploaded data files work when the error occurs.

 

Maybe also nice to know:

My multi-form works with a modified my-function.php:

    if ( $setting == "nextForm" ){
        if ( $cformsdata['id']=='' ){
            $userfield = $cformsdata['data'][$cformsdata['data']['$$$7']];
                if ( $userfield == 'Eintrag 1' ) return 2;
                if ( $userfield == 'Eintrag 2' ) return 3;
                if ( $userfield == 'Eintrag 3' ) return 4;
            else
                return $oldvalue;
        }
    }

 

cformsII: Version v14.0

WordPress:

September 30, 2013
10:07 am
olivier89
Guest

I  have the same problem with version 14.6 of Cforms, and Wp 3.6 :

the 2 errors are thrown when no upload is made in the multipage form

I just  added an isset condition before the loop having the problematic array (same correction for both error) :

foreach ( array_keys($_SESSION['cforms']['upload']) as $n )

if (isset($_SESSION['cforms']['upload'][$n]['files'])) { // because it can be not set

foreach ( array_keys($_SESSION['cforms']['upload'][$n]['files']) as $m ){

Maybe this could be updated in the next version of cforms

Forum Timezone: Europe/Berlin

Most Users Ever Online: 959

Currently Online:
29 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

tracedef: 43

mores: 21

Gyrus: 20

frozenwaste: 18

asuffredini: 15

photoworks: 14

Member Stats:

Guest Posters: 3756

Members: 1463

Moderators: 3

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 5355

Posts: 18731

Newest Members: juredujmovic, dreamkeeper, rajattyagi, wrokaa, lukass

Moderators: Paul (421), cnymike (8), sonika (95)

Administrators: Oliver (6400), Nicky (3)