path.rules.inc line 34 (probably like 42 as well)

The 'language' key is not always present on the $settings array and results in a PHP notice:

Notice: Undefined index: language in rules_condition_url_has_alias() (line 34 of /var/www/vhosts/<redacted for security>/httpdocs/sites/all/modules/rules/rules/modules/path.rules.inc).

Comments

pwilson’s picture

Component: Rules Core » Rules Engine
StatusFileSize
new958 bytes

First patch, please let me know if I royally mucked something up ;)

bcn’s picture

Version: 6.x-1.4 » 6.x-1.5
Component: Rules Engine » Rules Core
Status: Active » Needs review
StatusFileSize
new1.71 KB

I noticed one more place where the 'language' key was not set...

tr’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

This was fixed in D7 by refactoring the code - the language code is now passed into the condition rather than being extracted from the $settings, and it is given a default value so is always set.

D6 is obsolete so this won't be fixed in Rules 6.x-1.x.