Results 1 to 8 of 8

Thread: Odd TRIM warning when editing page

  1. #1
    Junior Member
    Join Date
    Jun 2004
    Posts
    13

    Cool Odd TRIM warning when editing page

    I am getting the following error displayed when I try to edit my vba cmps pages.

    Warning: trim() expects parameter 1 to be string, array given in [path]\admincp\vba_cmps_admin.php on line 3290


    It is displayed right after the Inactive Modules and right before the Usergroup permissions. As a result, the previously set usergroup permissions end up being blank, so it looks like it is failing to retreive the settings from the database due to that error.

    Line 3290:
    Code:
    if ((trim($page['userperms']) AND in_array($usergroup['usergroupid'], $page['userperms']))

    Anyone ever see this before?

  2. #2
    Administrator Brian's Avatar
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,463

    Default

    Does your Admin CP => vBa CMPS => Diagnostics link return any errors?
    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.

  3. #3
    Junior Member
    Join Date
    Jun 2004
    Posts
    13

    Default

    Hi Bri,

    No problems are listed under the cmps diags.

  4. #4
    Administrator Brian's Avatar
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,463

    Default

    Ahhh, I see the issue now. That's strange that it's not giving me the error locally or on any of my sites, but the trim() function shouldn't be used there. I've just applied the fix to the admincp/vba_cmps_admin.php file in the download package here, so if you will download the files again and upload the new file that should take care of the issue.
    Or if you'd rather apply the fix manually, just look in the file for this code:
    PHP Code:
            if ((trim($page['userperms']) AND in_array($usergroup['usergroupid'], $page['userperms']))
                OR 
    $_REQUEST['do'] == 'addpage'
            

    And replace with this:
    PHP Code:
            if (in_array($usergroup['usergroupid'], $page['userperms']) OR $_REQUEST['do'] == 'addpage'
    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.

  5. #5
    Junior Member
    Join Date
    Jun 2004
    Posts
    13

    Thumbs up Resolved

    Perfect! That fixed it.

    Thanks for your help Brian.

  6. #6
    Junior Member
    Join Date
    Apr 2007
    Posts
    1

    Default

    tnx brian

  7. #7
    Senior Member
    Join Date
    May 2007
    Location
    Pakistan
    Posts
    113

    Default

    thanks brain
    Mortal Kombat Nexus Online
    Pakistan 1st Mortal Kombat Wesbite

  8. #8

    Default

    HI!!
    If this will be the code:

    PHP Code:
    if ((trim($page['userperms']) AND in_array($usergroup['usergroupid'], $page['userperms']))
    OR $_REQUEST['do'] == 'addpage'
    )
    And replace with this:
    PHP Code:
    if (in_array($usergroup['usergroupid'], $page['userperms']) OR $_REQUEST['do'] == 'addpage')
    What was the main idea and how can we fix and find solution on this?any contribution?
    Thank you!!
    how to hypnotize people

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help: Editing the page
    By indiansword in forum "How Do I..." Questions
    Replies: 1
    Last Post: 09-19-2008, 10:32 AM
  2. editing cmps_index page
    By iMoney in forum "How Do I..." Questions
    Replies: 1
    Last Post: 08-04-2008, 10:50 AM
  3. Trim Forum links in Recent Threads Module !!
    By veenuisthebest in forum Troubleshooting & Problems
    Replies: 1
    Last Post: 05-06-2008, 02:10 PM
  4. Wysiwyg on Page Editing
    By Thalamus in forum Troubleshooting & Problems
    Replies: 2
    Last Post: 06-19-2007, 05:01 AM
  5. Editing Page Options
    By PoetJC in forum Troubleshooting & Problems
    Replies: 2
    Last Post: 01-08-2007, 11:02 AM

Posting Permissions

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