Results 1 to 3 of 3

Thread: Fatal error: Call to undefined function: array_combine()

  1. #1
    Join Date
    Jun 2010
    Posts
    10

    Default Fatal error: Call to undefined function: array_combine()

    My install went extremely well, everything was working fine. I decided to attempt a new module. Maybe I was clicking around too fast, not sure, but now my home page gives me this error, and I'm not sure how to correct it.

    I deleted the module I created, it never worked, I was trying to add a Google Calendar in the center column.


    Fatal error: Call to undefined function: array_combine() in /home/yaddy/public_html/forums/includes/vba_cmps_include_top.php on line 978

  2. #2
    Join Date
    Jun 2010
    Posts
    10

    Default

    Follow up post.

    I stumbled upon a fix for this issue, but want to bring this to the attention of the development team.

    From what I read via google searches, the "array_combine" was meant for PHP v5. Some offered up new code so that it would be compatible on for those of us still running PHP v4. I didn't not experiment with any of the code change suggestions I saw because they did not pertain to vBa, but to other applications.

    With that said, I went back through some of the changes I made in my Admin Control Panel. As it turns out, under EDIT PAGE, I had selected "Allow Page Customization" and changed it to "Yes". This is apparently what throws the fatal error because once I went back to select "No" (do not allow page customization", the error disappeared and my portal was back.

  3. #3
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default

    Thank you for pointing this out. You should be able to correct the issue by looking in your includes/vba_cmps_include_top.php file for this code at the top:
    PHP Code:
    error_reporting(E_ALL & ~E_NOTICE & ~8192); 
    And adding this just below:
    PHP Code:
    // ##### array_combine() for PHP 4- ###########################################
    if (!function_exists('array_combine'))
    {
        function 
    array_combine($keys$values)
        {
            if (
    sizeof($keys) != sizeof($values))
            {
                return 
    false;
            }

            
    $array = array();
            
    $key 0;

            foreach (
    $keys AS $keyvalue)
            {
                
    $array[$keyvalue] = $values[$key];
                
    $key++;
            }

            return 
    $array;
        }

    Frequently Asked Questions
    CMPS Users Manual

    For vBadvanced software assistance, please use the support forums.
    Unsolicted PMs, IMs, and email will not be responded to.
    If you have a non-software related question or problem with your account, please submit a support ticket.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Fatal error: Call to undefined function
    By Lars-Christian in forum Troubleshooting & Problems
    Replies: 4
    Last Post: 06-09-2007, 03:47 PM
  2. Fatal error: Call to undefined function...
    By zodehala in forum Troubleshooting & Problems
    Replies: 4
    Last Post: 02-19-2007, 10:26 AM
  3. Fatal error: Call to undefined function
    By nealparry in forum Troubleshooting & Problems
    Replies: 3
    Last Post: 02-06-2007, 03:38 PM
  4. need help Fatal error: Call to undefined function:
    By redspider in forum Troubleshooting & Problems
    Replies: 1
    Last Post: 03-26-2006, 07:54 PM
  5. Fatal error: Call to undefined function:
    By ony101 in forum Troubleshooting / "How do I..." Questions
    Replies: 12
    Last Post: 08-26-2005, 02:47 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
  •