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.
From bug turned up here: http://drupal.org/node/206272
The title arguments are not unserialzed, so this test:
if (empty($item['title_arguments'])) {
in http://api.drupal.org/api/function/_menu_item_localize/6 and a couple other places always returns FALSE! Since it's testing
if (empty('a:0:{}')) {
Attached patch is a start, but now some things try to get unserialized twice.
Comment | File | Size | Author |
---|---|---|---|
#2 | title_arguments.patch | 1.21 KB | chx |
#1 | unserialize-title-callback-206510-1.patch | 1.98 KB | pwolanin |
Comments
Comment #1
pwolanin CreditAttribution: pwolanin commentedok - this works, and simplifies the logic of the code a little, since t() doesn't care if we pass an empty array as the second argument.
Comment #2
chx CreditAttribution: chx commentedI do not like this solution. You call a lot of serialize totally unnecessary. I would rather make that empty succeed by storing empty string for empty title arguments which is the majority of the cases.
Comment #3
pwolanin CreditAttribution: pwolanin commentedLooks good - as chx points out, unserialize is expensive.
Comment #4
pwolanin CreditAttribution: pwolanin commentedquick test - works as desired.
Comment #5
Gábor HojtsyThanks, committed.
Comment #6
(not verified) CreditAttribution: commentedAutomatically closed -- issue fixed for two weeks with no activity.