views3 error with contextual filter I'm trying to show user posts in their profile with views 3 by following this post  http://drupal.org/node/228959#comment-4591334

after i add the following code to the contextual filter

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


and it works, but also giving this error

Notice: Array to string conversion in views_handler_argument_numeric-&gt;title() 
(line 77 of /test_drupal/sites/all/modules/views/handlers/views_handler_argument_numeric.inc).

Warning: html_entity_decode() expects parameter 1 to be string, 
array given in decode_entities() (line 429 of test_drupal/includes/unicode.inc).
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.