Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#1 | notice_undefined-2541026-1.patch | 473 bytes | joelpittet |
Comments
Comment #1
joelpittetComment #2
geerlingguy CreditAttribution: geerlingguy at Acquia commentedThis 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.
Comment #3
geerlingguy CreditAttribution: geerlingguy at Acquia commentedI'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.
Comment #4
joelpittetOk thanks, I'll remove the patch, flush the cache and if it still happens I'll re-open.
Comment #5
joelpittet@geerlingguy I'm still getting this error in production and I've cleared cache a few times since monday, please re-consider.
Comment #6
brad.bulger CreditAttribution: brad.bulger commentedI'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?
Comment #7
geerlingguy CreditAttribution: geerlingguy at Acquia commentedSounds 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.
Comment #10
geerlingguy CreditAttribution: geerlingguy at Acquia commentedFixed in D7, switching over to D8.
Comment #11
geerlingguy CreditAttribution: geerlingguy at Acquia commentedFixed 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.