Simpletest unsupported operand type error.

I'm getting an "Unsupported operand types" error in Simpletest 6.x-2.4.

Unfortunately Drupal.org is offline at the moment so I can't post there.

For some reason my version of PHP won't add arrays like this:


$myarray = $array1 + $array2;

But you can use array_merge like this:


$myarray = array_merge($array1, $array2);

If you get an error about one of the arrays not being an array then you can type cast the arguments (php5) like so:


$myarray = array_merge((array) $array1, (array) $array2);




Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options