We noticed while using coder_upgrade that values passed into variable_get() that contains special characters were being wrapped with single quotes which was ending up as a syntax error due to incorrect conversion. For example:
return variable_get('cas_server_whitelist_failure', t('You do not have permission to login to CAS from this service.'));
While troubleshooting the reason for this, we noticed 2 issues in conversions/call.inc:
First Issue: The variable $raw_value was not being referenced in the preg_match() call which prevented the dynamic warning from being written to the patch file:
Once this was fixed, we noticed that string values that contained a "space" were triggering the dynamic warning so we updated the elseif to account for this:
Hello,
We noticed while using coder_upgrade that values passed into variable_get() that contains special characters were being wrapped with single quotes which was ending up as a syntax error due to incorrect conversion. For example:
return variable_get('cas_server_whitelist_failure', t('You do not have permission to login to CAS from this service.'));
While troubleshooting the reason for this, we noticed 2 issues in conversions/call.inc:
First Issue: The variable $raw_value was not being referenced in the preg_match() call which prevented the dynamic warning from being written to the patch file:
// elseif (preg_match('@[\.\s\$\[\]\#\>\(]@', $value)) {
elseif (preg_match('@[\.\s\$\[\]\#\>\(]@', $raw_value)) {
Once this was fixed, we noticed that string values that contained a "space" were triggering the dynamic warning so we updated the elseif to account for this:
elseif (!preg_match('@^\'[^\']*\'$@', $raw_value) && preg_match('@[\.\s\$\[\]\#\>\(]@', $raw_value)) {
Cheers!