Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 CreditAttribution: iamjon commentedComment #2
iamjon CreditAttribution: iamjon commentedhopefully my patching ability has improved
Comment #3
iamjon CreditAttribution: iamjon commentedremoved extra space from prefix
Comment #4
merlinofchaos CreditAttribution: merlinofchaos commentedCommitted to all branches.