Q:

Error in User Edit form

Have searched a lot for this issue. I am not sure if it is a php issue or Drupal issue but the error message is pointing towards Drupal. Whenever i go to the user edit form in Drupal 7 i get the following error:
Notice: Undefined index: #title in user_account_form() (line 1070 of /opt/lampp/htdocs/modules/user/user.module)
I have searched a lot. This seemed relevant http://drupal.org/node/1088964 but it did not work out for me. Any suggestions would be appreciated.
Thanks
Edit 1: I am using 7.18 and yes i have done some changes in user registration form...i have commented the lines in bold and added a placeholder. Now when i uncomment them then no error occurs but then in my user registration form those fields show up...let me clear this through 2 images...1st image shows the case when i commented the lines(in bold) and added a placeholder (this is what i want it to look like): 

However this gives me the error in user edit form. Now when i uncomment, it looks like

I do not want the labels Username and password to show up there. How can i achieve this without that error bugging me. The line number 1070 is inside user_account_form as well. I have realized the error is because i have commented out and it is looking for a title field or password field but then my registration form looses its appearance as i want. Is there a way round to do this.
function user_account_form(&$form, &$form_state) {
      global $user;

      $account = $form['#user'];
      $register = ($form['#user']->uid > 0 ? FALSE : TRUE);

      $admin = user_access('administer users');

      $form['#validate'][] = 'user_account_form_validate';

      // Account information.
      $form['account'] = array(
        '#type'   => 'container',
        '#weight' => -10,
      );
      // Only show name field on registration form or user can change own username.
      $form['account']['name'] = array(
        '#type' => 'textfield',
        **//'#title' => t('Username'),**
        '#maxlength' => USERNAME_MAX_LENGTH,
        //'#description' => t('Spaces are allowed; punctuation is not allowed except for periods, hyphens, apostrophes, and underscores.'),
        '#required' => TRUE,
        **'#attributes' => array('class' => array('username'), 'placeholder'=>t('Username')),**
        '#default_value' => (!$register ? $account->name : ''),
        '#access' => ($register || ($user->uid == $account->uid && user_access('change own username')) || $admin),
        '#weight' => -10,
      );

      $form['account']['mail'] = array(
        '#type' => 'textfield',
       **'#title' => t(' Email Id'),**
        '#maxlength' => EMAIL_MAX_LENGTH,
       // '#description' => t('A valid e-mail address. All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail.'),
        '#required' => TRUE,
        '#default_value' => (!$register ? $account->mail : ''),
        **'#attributes' => array('placeholder' => t ('E-mail')),**
      );

The lines where the error points to :
if (!$pass_reset) {
      $protected_values['mail'] = $form['account']['mail']['#title'];
      $protected_values['pass'] = t('Password');

A:

You shouldn't be modifying any core files. Removing a declaration for a value that needs to be used elsewhere is causing your problem, and the solution is to make your changes using hooks and templates in custom modules and themes, which are Drupal's way of allowing users to modify behavior and output. 
This thread contains discussion of theming the user edit page, and has links to helpful information.

