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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

LNakamura created an issue. See original summary.

LNakamura’s picture

Uploading patch...

LNakamura’s picture

Issue summary: View changes
LNakamura’s picture

Status: Active » Needs review
LNakamura’s picture

Status: Needs review » Active

Update: figured out why the array was being sent periodically, and fixed that - but it would still be nice to protect against these warnings...