Problem/Motivation

This may be due to old form cache but it may be worth checking the string for a pipe before splitting and expecting a value.

Notice: Undefined offset: 1 in honeypot_get_time_from_signed_timestamp() (line 450 of /honeypot/honeypot.module).

Proposed resolution

Check for pipe.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#1 notice_undefined-2541026-1.patch473 bytesjoelpittet
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joelpittet’s picture

Status: Active » Needs review
FileSize
473 bytes
geerlingguy’s picture

This is probably the result of form cache entries, and on a typical site, these errors should go away within a few hours, once the cache entries get stale... I'm trying to think whether it's worth the effort to add this in (and cause every function call to have the extra μs worth of processing), considering that most sites that have already updated Honeypot should be good to go at this point, and those that haven't will still have old cache entries be flushed out soon after Honeypot is upgraded.

geerlingguy’s picture

Status: Needs review » Closed (won't fix)

I'm going to mark this as closed—this is an issue that should go away for any site upgrading Honeypot now, and the number of sites that haven't yet upgraded and will is fairly small now.

joelpittet’s picture

Ok thanks, I'll remove the patch, flush the cache and if it still happens I'll re-open.

joelpittet’s picture

Status: Closed (won't fix) » Needs review

@geerlingguy I'm still getting this error in production and I've cleared cache a few times since monday, please re-consider.

brad.bulger’s picture

I'm also getting this in production after recent upgrade, on multiple sites. All our caches have definitely been cleared multiple times. However, I am not seeing this error on every access to the registration form. I don't know if that's because honeypot is not active for me when I go to the reg form or what. Could this be caused by spammers submitting an outdated copy of the form?

geerlingguy’s picture

Status: Needs review » Reviewed & tested by the community

Sounds good—also, if someone is attempting to forge or remove a timestamp value from the form submission, then that could throw a notice too, so I do see the value in this ticket.

  • geerlingguy committed a9b25ba on 7.x-1.x
    Issue #2541026 by geerlingguy: Use a consistent return value for...
geerlingguy’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Fixed in D7, switching over to D8.

geerlingguy’s picture

Title: Notice: Undefined offset: 1 in honeypot_get_time_from_signed_timestamp() (line 450 » Fix notice in honeypot_get_time_from_signed_timestamp()
Status: Patch (to be ported) » Fixed

Fixed in D8 as well. Since this and a couple other little issues affect a number of D7 sites, I'm going to go ahead and release 7.x-1.20 now, with these fixes.

  • geerlingguy committed 419477a on 8.x-1.x
    Issue #2541026 by geerlingguy: Fix notice in...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.