backdrop-contrib / honeypot

Backdrop port of Drupal module. Uses both the honeypot and timestamp methods of deterring spam bots from completing forms on your site.
GNU General Public License v2.0
3 stars 1 forks source link

honeypot_cron() calling undefined variable #2

Closed quicksketch closed 9 years ago

quicksketch commented 9 years ago

Nice simple cron function:

function honeypot_cron() {
  // Delete {honeypot_user} entries older than the value of honeypot_expire.
  db_delete('honeypot_user')
    ->condition('timestamp', time() - $config->get('expire'), '<')
    ->execute();
}

However, $config is not defined. Perhaps that should be config_get('honeypot.settings', 'expire') instead?

herbdool commented 9 years ago

Thanks. Fixed 34e3c4cdc824930538af060c5fabce63d7e8b0e1