Results 1 to 5 of 5
Like Tree1Likes
  • 1 Post By clapboom

Thread: Warning: Invalid argument supplied for foreach()

  1. #1
    Thread Starter
    clapboom's Avatar
    Join Date
    Jan 2014
    Location
    United States
    Posts
    13
    Thanks
    2
    Thanked 1 Time in 1 Post

    Warning: Invalid argument supplied for foreach()

    I am getting an error when trying to create a listing.
    When I choose a category for the listing (after choosing a plan), the custom form for that category should drop down, but nothing appears, except this message:

    Warning: Invalid argument supplied for foreach() in /home/mprice33/public_html/wp-content/themes/vantage/includes/custom-forms.php on line 49

    The current code is...
    PHP Code:

    46 
    function va_render_form$categories$taxonomy$listing_id ) {
    47     $fields = array();
    48 
    49     
    foreach ( $categories as $category ) {
    50         foreach ( va_get_fields_for_cat$category$taxonomy ) as $field ) {
    51             $fields[$field['name']] = $field;
    52            $fields[$field['name']]['cat'] = $category;
    53         }
    54     }
    55 
    56     $fields 
    apply_filters'va_render_form_fields'$fields$listing_id$categories );
    57     foreach( $fields as $field ) {
    58         $html html'div class="form-field"'scbForms::input_from_meta$field$listing_id ) );
    59         echo apply_filters'va_render_form_field'$html$field$listing_id$categories$taxonomy );
    60     }
    61 
    Things were fine and working, until this morning when I was going to purchase a listing to test the Auth.net Plugin.

    What could have caused this, and where should I begin looking to repair it?

  2. #2
    dimitris's Avatar
    Join Date
    Oct 2011
    Location
    Earth
    Posts
    20,617
    Thanks
    222
    Thanked 1,873 Times in 1,770 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  3. #3
    red20me's Avatar
    Join Date
    Jul 2013
    Location
    United Kingdom
    Posts
    473
    Thanks
    1
    Thanked 104 Times in 93 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  4. #4
    Thread Starter
    clapboom's Avatar
    Join Date
    Jan 2014
    Location
    United States
    Posts
    13
    Thanks
    2
    Thanked 1 Time in 1 Post
    You must be an AppThemes customer and logged in to view this response. Join today!
    dimitris likes this.

  5. #5
    red20me's Avatar
    Join Date
    Jul 2013
    Location
    United Kingdom
    Posts
    473
    Thanks
    1
    Thanked 104 Times in 93 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Dimitris Warning: invalid argument suppplied for foreach [VANTAGE]
    By cfajardo79 in forum Report Vantage Bugs (Legacy)
    Replies: 5
    Last Post: December 20th, 2013, 10:24 AM
  2. Warning: missing argument 2
    By kerstenst in forum Report ClassiPress Bugs
    Replies: 3
    Last Post: December 15th, 2012, 11:16 AM
  3. Replies: 1
    Last Post: November 16th, 2012, 07:36 AM
  4. Replies: 1
    Last Post: June 18th, 2012, 06:24 AM
  5. Replies: 1
    Last Post: June 18th, 2012, 06:24 AM