Question: So I've gotten myself into a bit of a pickle and need assistance from StackOverflow Gods. 

We're trying to transfer a Magento site from one server (Godaddy) to another (Private Virtual Server) for the purpose of becoming a test site. 

I'm not familiar with Magento (my first mistake) but I researched migration, and I ran across an article that said all you need to transfer is the database, theme files, catalog files and skin files. 

So that's just what we did. We setup a fresh install, added the files and the site (<http://boulderfootandankle.com/apv-test/>) looks like it's got some formatting errors. We figured we could fix those after adding the database. 

As soon as we connected the database through the local.xml file, the theme changed to a generic one (I imagine a fallback) and we were locked out of the admin. 

I tried a number of the solutions offered for this very problem, which included:

1. Clearing the var/cache and var/session folders.
2. Altering the core config data values for the unsecure and secure web base urls.
3. Deleting the unsecure and secure web base urls and cookie values form the database.
4. Changing the sessions save CDATA from "files" to "db"
5. Changing the install date to the original
6. Altering the varien file

...and nothing seems to work. 

At this point, I'm just wondering if doing a fresh transfer of the site from one server to another, instead of transferring specific files into a fresh install, would work

Answer: 
In my mind your State definition is:

```
int[][] State;

```

Array is a reference type and when you copy an element from the State array you get a reference to the array from the first list and the both references map to the same int[] array. So when you change array stored at SubArray you use a link to the same array.

The simple fix is a copy of the source array

```
var SubState = State[0].ToArray();

```
Obviously your element at position 0 of `State` is an array of `int` which is a reference-type. Thus both `SubState` and `State` reference the same array which is why changes to any of their elements are reflected by both. To overcome this problem you may create a copy of your `State`-array and copy its values to `SubState`:

```
States.CopyTo(SubStates, 0);

```

EDIT: Thius assumes that `SubStates` was already initialized with the same size as `States`. e.g:

```
int[] SubStates = new int[States[0].Length];

```