1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Warning: array_keys()

Discussion in 'General Programming Chat' started by kesoh, Apr 10, 2009.

  1. kesoh

    kesoh Registered Member

    Joined:
    Jun 2, 2008
    Messages:
    55
    Likes Received:
    21
    Home Page:
    I am trying to install CB Profit feeds Gen.. all installed ok but when I try to Synchronize Categories I get this.......... Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/blah/public_html/newfolder/newadmin/sync_cat.php on line 89 ...can someone help me out... here is the code for sync_cat.php

    Thanks For Any Help ..........(Sorry for the long post thought it would be better at least I hope)


     
  2. kesoh

    kesoh Registered Member

    Joined:
    Jun 2, 2008
    Messages:
    55
    Likes Received:
    21
    Home Page:
    Somebody please help.........I am stuck I really want this to work please help
     
  3. dacash

    dacash Registered Member

    Joined:
    Jan 28, 2008
    Messages:
    51
    Likes Received:
    15
    Location:
    on the dark side.
    i'm looking into it for you, this is telling you that the var passed to the function requires a Array, and it gotten something else.

    \I'll update you when i find anything in code.
     
  4. dacash

    dacash Registered Member

    Joined:
    Jan 28, 2008
    Messages:
    51
    Likes Received:
    15
    Location:
    on the dark side.
    Ok i can't really go into much details, since if you try to run this, it needs other files. But what i found it that
    $categories
    that is used on line 89 in
    $codes = array_keys($categories);

    Well $categories isn't a Array. So array_keys() function can't work.
    When the var $categories is made, maybe their is a problem and it's not a Array returned.

    You could try to add on line 86 just after this line
    $categories = getCategories($mainPage);

    add this

    print_r($categories);

    This will print out the categories var if it's array. Let me know what it prints out.
     
  5. kesoh

    kesoh Registered Member

    Joined:
    Jun 2, 2008
    Messages:
    55
    Likes Received:
    21
    Home Page:
    No did not work thanks for your help ......did not print out anything