Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Aug 2009
    Location
    Longs, SC
    Posts
    626
    Plugin Contributions
    2

    Default PHP Warning: extract() expects parameter 1 to be array, null given

    I’ve got a little bit of a head scratcher. I have a client that was trying to implement rich pins for Pinterest as described in this post http://www.zen-cart.com/showthread.php?208331-Rich-Pins. It’s causing the same errors to be written to the cache that are described there. The array is generated in includes/modules/meta_tags.php which is called by includes/templates/xxxxxx/common/html_header.php.

    I can’t figure out what’s causing this error. I added a print_r($product_info_metatags->fields); command just before the extract and it outputs the following I neatened it up a little):

    Array (
    [products_name] => Scalloped Favor Box - Rainbow Stripe
    [products_model] =>
    [products_price_sorter] => 5.9500
    [products_tax_class_id] => 1
    [metatags_title_status] => 0
    [metatags_products_name_status] => 0
    [metatags_model_status] => 0
    [products_id] => 869
    [metatags_price_status] => 0
    [metatags_title_tagline_status] => 0
    [products_description] => Sweetly Scalloped Favor Boxes are a lovely way to feature special snacks or small gifts for your party guests. Made from premium semi-gloss cardboard. Imported from Australia.
    Quantity: 6 Favor Boxes
    Measurements: 2.75" high x 3" wide
    [product_is_free] => 0
    [product_is_call] => 0
    [metatags_title] =>
    [metatags_keywords] =>
    [metatags_description] =>
    )?>

    Obviously this is not null and it’s an array. Got any ideas?

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: PHP Warning: extract() expects parameter 1 to be array, null given

    Could it be the quote characters in the measurements field that is causing the problem?

    Try removing them and see if the problem goes away.

    Cheers
    RodG

    tip: If you add echo "<pre>" before doing the print_r() you wouldn't need to 'neaten it up a bit'.
    eg:
    echo "<pre>" ; print_r($product_info_metatags->fields);


  3. #3
    Join Date
    Aug 2009
    Location
    Longs, SC
    Posts
    626
    Plugin Contributions
    2

    Default Re: PHP Warning: extract() expects parameter 1 to be array, null given

    Thanks Rod. I'll give that a shot.

 

 

Similar Threads

  1. Warning: trim() expects parameter 1 to be string, array given
    By jpietrowiak in forum General Questions
    Replies: 2
    Last Post: 8 Jun 2013, 07:06 PM
  2. PHP Warning: addslashes() expects parameter 1 to be string, array given
    By schoolboy in forum All Other Contributions/Addons
    Replies: 11
    Last Post: 10 May 2013, 02:19 PM
  3. v139e PHP Warning: strlen() expects parameter 1 to be string, array given in
    By irishshopper in forum Basic Configuration
    Replies: 4
    Last Post: 7 Mar 2013, 08:06 PM
  4. v139h PHP Warning: strip_tags() expects parameter 1 to be string, array given
    By BlessIsaacola in forum General Questions
    Replies: 1
    Last Post: 6 Mar 2012, 01:32 PM
  5. v150 PHP Warning: strlen() expects parameter 1 to be string, array given
    By caffeitalia in forum General Questions
    Replies: 1
    Last Post: 1 Feb 2012, 03:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg