I updated to 7.x-1.4 yesterday and now I'm getting a number of errors during cron. I updated to 7.x-1.x-dev to see if it resolved the issue, but it did not. This is what I am seeing:

Notice: Trying to get property of non-object in registration_cron() (line 1156 of /site_root/sites/all/modules/registration/registration.module).
Notice: Trying to get property of non-object in registration_cron() (line 1154 of /site_root/sites/all/modules/registration/registration.module).
Notice: Undefined variable: result in registration_cron() (line 1154 of /site_root/sites/all/modules/registration/registration.module).
Notice: Trying to get property of non-object in registration_cron() (line 1154 of /site_root/sites/all/modules/registration/registration.module).

These errors repeat for every registration that is in the held state. I am using registration types that were created before the update. Is there a problem with existing registrations and the new held state?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

caxy4’s picture

Did you run update.php after updating the Registration module to 1.4?

LonitaD’s picture

Yes, I ran update.php. I didn't see any problems during the update.

thatoneguy’s picture

I ran into the same issue when I tested this myself. Here is a patch that fixes the problem.

thatoneguy’s picture

FileSize
1.04 KB

Scratch that last patch. I missed a line.

LonitaD’s picture

FileSize
1.08 KB

The patch in #4 fixes the cron errors. However, it cancels registrations that have the held state if the hold expiration is set to 0, which the description says disables the expiration behavior. I created a new patch which first checks if the expiration is set to 0 before changing the state to canceled.

AaronBauman’s picture

Status: Active » Needs review

Patch looks good to me.
1 vote for RTBC

  • caxy4 committed 5c2a03e on 7.x-1.x authored by LonitaD
    Issue #2476647 by thatoneguy, LonitaD: Errors during Cron
    
caxy4’s picture

Status: Needs review » Closed (fixed)

Committed - 5c2a03e