Active
Project:
Drupal for Facebook
Version:
7.x-3.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Sep 2011 at 21:15 UTC
Updated:
4 Sep 2011 at 21:15 UTC
As a user, when editing my profile page at user/[uid]/edit, Drupal complains after submit that, "Fatal error: [] operator not supported for string line 678 fb_user.module."
The problem is the conditional only asks if ($edit['map']) {. Change to the following to correct:
<?php
// starting at line 672
/**
* Implements hook_user_update.
*
* User is about to be updated.
*/
function fb_user_user_update(&$edit, $account, $category) {
if (isset($edit['map'])) { // <-- add the 'isset()' function to avoid this warning w/ php 5.3
_fb_user_set_map($account, $edit['map']);
}
else {
// Delete account mapping, because administrator has unchecked the connect option.
$num_deleted = db_delete('fb_user')
->condition('uid', $account->uid)
->execute();
fb_invoke(FB_USER_OP_POST_USER_DISCONNECT, array('account' => $account), NULL, 'fb_user');
}
}
?>
I am sorry I didn't roll a patch. It's one line, and the project I am working on already has 4 other changes from other issue queues to fb core that I wouldn't want to add to this issue.
Joe