pathauto produces lots of 'Use of undefined constant PATHAUTO_CASE_LOWER' warnings
| Project: | Pathauto |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
I'm running branch tag 'DRUPAL-6--1' and have seen this on a couple sites when updating content whose type has a pathauto rule. when saving the content I see many warning notices that:
notice: Use of undefined constant PATHAUTO_CASE_LOWER - assumed 'PATHAUTO_CASE_LOWER' in /home/standalone_web/webroot/drupal/bikewinter.org/sites/bikewinter.org/modules/contrib/pathauto/pathauto.inc on line 212.
This warning is repeated many many times. It's distracting if one has notice messages turned on (as my host does) and has them going to the screen (as I do during site dev). It's a simple fix:
212c212
< if (variable_get('pathauto_case', PATHAUTO_CASE_LOWER)) {
---
> if (variable_get('pathauto_case', 'PATHAUTO_CASE_LOWER')) {
or define it as a constant.

#1
Yeah, this is highly annoying. The constant was introduced in #343851: pathauto_cleanstring() does not convert to lowercase (consolidate all text altering code to pathauto_cleanstring) but is never declared anywhere, also, it's not consistent in the code. If you look in path.admin.inc, the code is using '1' instead of the constant. Attached patch removes the constant and uses '1' again. Let's fix this, it's easy!
#2
changing status