Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
We discovered that the path sent to content_lock_is_path_protected() is periodically an array, which was generating scads of warnings for one of our clients (3 from content_lock_is_path_protected() and 1 from content_lock_content_lock_path_protected()).
Here are the warnings:
Warning: Illegal offset type in isset or empty in content_lock_is_path_protected() (line 144 of /home/vagrant/docroot/sites/all/modules/contrib/content_lock/content_lock.module).
Warning: Illegal offset type in content_lock_is_path_protected() (line 163 of /home/vagrant/docroot/sites/all/modules/contrib/content_lock/content_lock.module).
Warning: Illegal offset type in content_lock_is_path_protected() (line 165 of /home/vagrant/docroot/sites/all/modules/contrib/content_lock/content_lock.module).
Warning: strpos() expects parameter 1 to be string, array given in strpos() (line 173 of /home/vagrant/docroot/sites/all/modules/contrib/content_lock/content_lock.module).
I will upload a patch for this shortly.
Comment | File | Size | Author |
---|---|---|---|
#2 | content_lock-fix-for-path-as-array-2894714-2.patch | 414 bytes | LNakamura |
Comments
Comment #2
LNakamura CreditAttribution: LNakamura at Mediacurrent commentedUploading patch...
Comment #3
LNakamura CreditAttribution: LNakamura at Mediacurrent commentedComment #4
LNakamura CreditAttribution: LNakamura at Mediacurrent commentedComment #5
LNakamura CreditAttribution: LNakamura at Mediacurrent commentedUpdate: figured out why the array was being sent periodically, and fixed that - but it would still be nice to protect against these warnings...