Fatal error: Cannot access empty property in /home/*****/****/includes/bootstrap.inc on line 712
Line 712 (in bold):
<?php
function drupal_unpack($obj, $field = 'data') {
if ($obj->$field && $data = unserialize($obj->$field)) {
foreach ($data as $key => $value) {
if (!isset($obj->$key)) {
$obj->$key = $value;
}
}
}
return $obj;
}
?>
That function drupal_unpack is called in user_load, which is what is being called five times inside the phpbbforum.module file. I can't pinpoint exactly which one is causing the error, but clearing the cookies seems to cure the error until they try and login again, in which case the error returns.
I've debugged and traced as much code as I can follow, and I'm lost.
PHPBB is set to be the master registration system, and I've got four users who have registered thus far on the forums who cannot login now (plus about 50 users who have no issues at all). These four have no password set in the users table, but putting in a dummy password doesn't have any issues.
Comments
Comment #1
gbrussel commentedDone some more tracking today of this particular error. It always seems to happen when I either view or edit a user whose password is not set in the users table. Meaning it hasn't sync'd up for some reason.
The line
$obj->$key = $value;is trying to set the $password for the $user account, but it can't pull an null field and it's not expecting one. This functiondrupal_unpack()is called in the user.module on line 170, in theuser_load()function. The user_load() function is called a few times in the phpbbforum.module, but the only place I can think of where it might fail is on line 2439 infunction _phpbbforum_user_edit_validate($uid, &$edit)where the line is called$user = user_load(array('uid' => $uid));.This happens when I try to view the account (http://example.com/user/71) or when I try to edit the account (http://example.com/user/71/edit). Is there some reason why the password would not get synced up? The accounts in question are not administrative accounts, they are not protected in any way, they are brand new accounts on both systems.
PHPBBForum Settings:
I'll also provide any other information you deem necessary to help debug this issue. Thanks!
Comment #2
gbrussel commentedEureka moment...I poked around in phpMyAdmin and saw that for the users who were working, they had this in the "data" field:
a:1:{s:7:"contact";s:1:"0";}Whereas broken users saw only this:
a:1:{s:0:"";s:0:"0";}So my guess is the module isn't passing in the user data
array('contact' => '0'), and this is somehow breaking the user logins. Stranger and stranger...Comment #3
twilliac commentedInteresting that this is showing up on the forum module.
I was having the same issue (bootstrap error) with the apply for role module when it was used on registration to select one of 2 role options.
Comment #4
twilliac commentedFor what I was talking about the same situation is present in the mysql Db
broken accts start:
a:8:{s:3:"rid";s:1:"3";s:13:"form_build_id";s:37:"form-eb8dc04ba0bfd228b2422969a19000cf"
the fine ones go:
a:6:{s:13:"form_build_id";s:37:"form-a3f7ad992c8f4d7931e66d22fbe2f3d7"
Comment #5
darrelk commentedI have the same problem too, now I can't even delete those unusable accounts as the admin. Problem occurred as soon as I tried to create a new account. So I don't think it's anything that I could have done after I created it to trigger this bug...
Comment #6
Redbluefire commentedI had this same error, but the patch here solved it. I haven't looked at the SQL side of things, but everything seemed fine afterward.
Comment #7
mak1e commented( $obj->$key ) this is what causing the problem (extra $ 'dollar' sign), I have changed it to ( $obj->key ) and the error ("Fatal error: Cannot access empty property") is gone, this used to work on an earlier version of PHP, I got this error when I migrated it to this version of php -v: