vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > vBa CMPS v3.0 Support > Bugs & Issues > Bugs From 3.2.1

Reply
 
Thread Tools Display Modes
  #1  
Old 09-16-2009, 12:53 PM
bobbo bobbo is offline
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?
Reply With Quote
  #2  
Old 09-16-2009, 12:55 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
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.
Reply With Quote
  #3  
Old 09-16-2009, 03:41 PM
bobbo bobbo is offline
Junior Member
 
Join Date: Jun 2004
Posts: 13
Default

Hi Bri,

No problems are listed under the cmps diags.
Reply With Quote
  #4  
Old 09-17-2009, 12:29 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
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.
Reply With Quote
  #5  
Old 09-17-2009, 03:34 PM
bobbo bobbo is offline
Junior Member
 
Join Date: Jun 2004
Posts: 13
Thumbs up Resolved

Perfect! That fixed it.

Thanks for your help Brian.
Reply With Quote
  #6  
Old 02-22-2010, 04:41 AM
behcet behcet is offline
Junior Member
 
Join Date: Apr 2007
Posts: 1
Default

tnx brian
Reply With Quote
  #7  
Old 04-07-2010, 08:09 AM
kokoko kokoko is offline
Senior Member
 
Join Date: May 2007
Location: Pakistan
Posts: 111
Default

thanks brain
__________________
Mortal Kombat Nexus Online
Pakistan 1st Mortal Kombat Wesbite
Reply With Quote
  #8  
Old 07-13-2010, 08:47 PM
ashantycapre ashantycapre is offline
Junior Member
 
Join Date: Jul 2010
Posts: 1
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
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -4. The time now is 10:14 AM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.