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 a child task for #422380: Convert all core module to use new static caching API focusing on the blog module.
Comment | File | Size | Author |
---|---|---|---|
#4 | jamesan_480122-4.patch | 665 bytes | JamesAn |
#3 | jamesan_480122-3.patch | 664 bytes | JamesAn |
#1 | jamesan_480122-2.patch | 657 bytes | JamesAn |
Comments
Comment #1
JamesAn CreditAttribution: JamesAn commentedThe blog module doesn't use static vars. The blogapi module uses 1 static var, $xmlrpcusererr, in blogapi_error(). I'm not sure what this static var does, but it's never reset.
Comment #2
cburschkaAdding a comment to that effect seems just superfluous, though. Change it or don't change it...
Wait, isn't the drupal_static intended to allow a clearing of *all* statics, even those that functions don't intend to reset, during tests?
Comment #3
JamesAn CreditAttribution: JamesAn commentedMakes sense. I was probably running on automatic.. =P There were a small handful of static vars, mostly in the testing code, that remained static. But yes, the majority of static vars should be converted over as was intended.
Comment #4
JamesAn CreditAttribution: JamesAn commentedComment #5
catchComment #6
Dries CreditAttribution: Dries commentedThe variable is never set ... That code doesn't make sense to me.
Comment #7
JamesAn CreditAttribution: JamesAn commentedWell, the patch turns the first result into:
modules/blogapi/blogapi.module: $xmlrpcusererr = &drupal_static(__FUNCTION__);
The second line has been with Drupal since at least 4.6, according to api.drupal.org. You're right. It seems $xmlrpcusererr is never set. Still, I'm not familiar with the XML-RPC protocol.
Maybe someone who knows more about the BlogAPI can shed some light?
Comment #8
Dries CreditAttribution: Dries commentedLet's discuss or research this some more.
Comment #13
lilou CreditAttribution: lilou commentedBlog API is removed : #537434: Drop the blog API from core
So this won't be necessary anymore.
Comment #14
apadernoComment #15
apaderno