This is valid in all versions of Views (6.x-2.x, 6.x-3.x, 7.x-3.x): views_var_export() doesn't properly encode array keys:
$output .= " '$key' => " . views_var_export($value, ' ', FALSE) . ",\n";
Should be:
$output .= " " . views_var_export($key, ' ', FALSE) . " => " . views_var_export($value, ' ', FALSE) . ",\n";
Critical because it means that Views exports are broken as soon as an array key contains a single quote.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | views_var_export.patch | 688 bytes | iamjon |
| #2 | views_var_export.patch | 689 bytes | iamjon |
Comments
Comment #1
iamjon commentedComment #2
iamjon commentedhopefully my patching ability has improved
Comment #3
iamjon commentedremoved extra space from prefix
Comment #4
merlinofchaos commentedCommitted to all branches.