views3 error with contextual filter
It looks like it's expecting a string, but your code is returning an array.

Try changing your code to the following:

if (arg(0) == 'user' &amp;&amp; is_numeric(arg(1))) {
  return arg(1);
}


That should return the string value rather than returning [0] =&gt; uid.