custom private message block generates error
In this case, the problem is that privatemsg_get_link() uses array() as default value for $account, but then uses the following code.

  if ($account == NULL) {
    global $user;
    $account = $user;
  }


The function should use NULL as default value for $account, in the same way user_access() does.

function user_access($string, $account = NULL) {
  global $user;

  if (!isset($account)) {
    $account = $user;
  }

  // ...
}


The error message you see is because the function tries to access $account-&gt;uid when $account is an empty array. An array doesn't have properties, and that is what the message is saying.
As the function is passing that value to user_access(), the same error would be raised from user_access(), which check the value of $account-&gt;uid, and for which an empty array is not the correct value to pass to its $account parameter, which requires an user object, or NULL.

It's fine to use the default values a function has, but you should check what the function does when it gets the default values for its parameters. 

It is wrong to call a function as privatemsg_get_link($recipients, $account = array(), $subject = NULL) when you want to use the default values for its parameters. Just call the function as privatemsg_get_link($recipients). With your code, you are setting $account to an empty array, and passing $account as parameter.
PHP doesn't have named parameters, but only positional parameters. If it had named parameters, it would be possible to call a function indifferently as functioname(34, param3 = 4, param2 = 12), or functioname(34, param2 = 12, param3 = 4).