warning: array_shift() [function.array-shift]: The argument should be an array ..... uc_store.module

Project:Ubercart Contributions
Component:Code
Category:
Priority:normal
Assigned:Unassigned
Status:active
Description
Project: 
Ubercart

I don't speak inglish Sad

warning: array_shift() [function.array-shift]: The argument should be an array in
[path to]modules\ubercart\uc_store\uc_store.module on line 2741.

Can you help me?

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: warning: array_shift() [function.array-shift]: The argument

When is this error message showing, and have you configured credit card encryption?

WiseMan's picture
Offline
Joined: 06/11/2008
Juice: 7
Re: Re: warning: array_shift() [function.array-shift]: The argum
Assigned to:Ryan» WiseMan

1. This error message showing on link admin/store/orders/...

2. I have not configured credit card encryption

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: warning: array_shift() [function.array-shift]: The a
Assigned to:WiseMan» Ryan

Not sure why the error message should be turning up there, but configuring encryption should clear it. If you're just doing testing right now, you can simply browse to the payment methods settings form, open the credit card settings fieldset, and put in files to generate a temporary encryption key in your files directory.

WiseMan's picture
Offline
Joined: 06/11/2008
Juice: 7
Re: Re: Re: Re: warning: array_shift() [function.array-shift]: T
Assigned to:Ryan» WiseMan

ок. Thanks

amaria's picture
Offline
Joined: 04/04/2008
Juice: 80
same here except happens when encrypting old cc data
Assigned to:WiseMan» amaria

I created the folder outside of my doc root but I get this error when encrypting old data. It also says the credit card data has been encrypted. So I have no idea whether it actually did it or not.

Chisholm Technologies, Inc.
Custom software development since 1999!
www.chisholmtech.com

Chisholm Technologies, Inc.
Custom software development since 1999!
www.chisholmtech.com

amaria's picture
Offline
Joined: 04/04/2008
Juice: 80
Re: same here except happens when encrypting old cc data

Ok, I fixed the warning (Had to set the correct permissions on the folder). But now how can I run the encryption again? Not that it really matters since I'm still using dummy data, but I thought it would be good to know.

Chisholm Technologies, Inc.
Custom software development since 1999!
www.chisholmtech.com

Chisholm Technologies, Inc.
Custom software development since 1999!
www.chisholmtech.com

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: same here except happens when encrypting old cc data
Assigned to:amaria» Ryan

I don't have the exact link off the top of my head, but it's in the CC configuration docs that I link to from that field's description.

goodeit's picture
Offline
Joined: 05/28/2008
Juice: 322
Re: Re: same here except happens when encrypting old cc data
Assigned to:Ryan» goodeit

out of curiosity, what are the correct permissions for the encrypted keys folder? I am getting an error using '644' as the folder permissions.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: same here except happens when encrypting old cc data
Assigned to:goodeit» Ryan

Hmm... I imagine you can just set it to 666 while creating the key and then back to 644 when you're done. Thanks for bringing this up... if what I said works, can you let me know so I can add it to the documentation?

goodeit's picture
Offline
Joined: 05/28/2008
Juice: 322
Re: Re: Re: Re: same here except happens when encrypting old cc
Assigned to:Ryan» goodeit

I had the folder set to 666 to create the keys, which worked fine. Setting the directory to 644 (file is always at 644) seems to 1) prevent me from viewing the directory and 2) cause the 3 array_shift() errors on line 2471. Resetting the directory to 777 removes all of the errors. After playing around I have found that 744 works without errors as well.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: Re: Re: same here except happens when encrypting old
Assigned to:goodeit» Ryan

In further testing I found that you had to give execute permission to the folder so fopen() could work properly for reading the keys.

goodeit's picture
Offline
Joined: 05/28/2008
Juice: 322
Re: Re: Re: Re: Re: Re: same here except happens when encrypting
Assigned to:Ryan» goodeit

so what is the final verdict on the correct permissions?

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Re: Re: Re: Re: Re: Re: same here except happens when encryp
Assigned to:goodeit» Lyle

755 is probably the best. Read is 4, write is 2, and execute is 1. Add them up and put them in each digit for owners, groups, and everyone else. It's really uncommon to have directories without execute permissions because you can't do anything with its files without it. Read permission only tells you what the names of the contained files are.

zareen's picture
Offline
Joined: 01/20/2008
Juice: 81
Had to install jquery update
Assigned to:Lyle» zareen

I found I had to install jquery update to get rid of the error. Working on a drupal 5 site.