I recently started getting this error when trying to run cron:

Fatal error: Cannot use object of type stdClass as array in /path/to/modules/accounttypes/accounttypes.module on line 1179

The line of code in question is this:

if (!$edit['selectAT']) {

Any ideas on how to fix this? It's preventing my cron jobs from running.

Thanks for any help!

Brad

Stats:

Account Types 5.x-1.4
Drupal 5.3
The current installed version of JQuery is 1.1.2
MySQL database 5.0.51
PHP 5.2.5
Unicode library PHP Mbstring Extension
Web server Apache/2.2.6 (FreeBSD) mod_ssl/2.2.6 OpenSSL/0.9.8g DAV/2 PHP/5.2.5 with Suhosin-Patch

Comments

rconstantine’s picture

Status: Active » Postponed (maintainer needs more info)

Looks like one or more users are not assigned an account type. I do believe I have a 'retroactive' button in the settings you may need to apply, so try that.

BradM’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

I tried that button, I think it was called something like "update old members" or something like that. Anyway, it didn't seem to change any settings. But your post gave me an idea, so I went and updated all users manually that didn't yet have an account type assigned to them.

That too didn't seem to do the trick, so for now I just uninstalled the module, and cron now runs without fail. Unfortunately I didn't have time to tackle the problem due to the holidays, and I needed cron to run while I am away. But thanks for the ideas anyway. :)

rconstantine’s picture

Well, when you have time, you should check to see which modules you are using call the user object during cron. I'm figuring there may be a module weight issue and some other module is interacting with this one in a poor way.