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.
The node_type_get_types() function isshould be immutable. The test enviroment is attached.
Comment | File | Size | Author |
---|---|---|---|
#2 | node-corrected.patch | 1.36 KB | nevergone |
#1 | node-corrected.patch | 1.39 KB | nevergone |
node-test.patch | 943 bytes | nevergone | |
Comments
Comment #1
nevergone CreditAttribution: nevergone commentedComment #2
nevergone CreditAttribution: nevergone commentedcorrected patch (permission error)
Comment #3
chx CreditAttribution: chx commentedComment #4
Dries CreditAttribution: Dries commentedWhile technically correct, I wonder if this needs fixing. We probably return a lot of variables that probably should be made immutable. That said, I'm not opposed to this patch but it might warrant some extra discussion.
Comment #5
catchAgreed. As far as I know, every cloned variable leads to double memory consumption, also this is a duplicate of #154859: Document that cached entity objects are not necessarily cloned any more.
Comment #6
nevergone CreditAttribution: nevergone commentedsimple test environment, create 5 node: